T
- event with hash to control versionpublic abstract class AgentHostDataHolder<T extends STOMPHostEvent & Hashable> extends AgentDataHolder<T>
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
updateLock
Constructor and Description |
---|
AgentHostDataHolder() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
getCurrentData(Long hostId) |
Map<Long,T> |
getData() |
T |
getData(Long hostId) |
T |
getUpdateIfChanged(String agentHash,
Long hostId) |
protected abstract T |
handleUpdate(T current,
T update) |
T |
initializeDataIfNeeded(Long hostId,
boolean regenerateHash) |
void |
onHostRemoved(Long hostId)
Remove data for the given host.
|
void |
resetData(Long hostId)
Reset data for the given host.
|
void |
setData(T data,
Long hostId) |
protected void |
setIdentifiersToEventUpdate(T update,
T hostData) |
void |
updateData(T update)
Apply an incremental update to the data (host-specific), and publish the
event to listeners.
|
getEmptyData, getHash, getHash, isIdentifierValid, regenerateDataIdentifiers
protected abstract T getCurrentData(Long hostId) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected abstract T handleUpdate(T current, T update) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public T getUpdateIfChanged(String agentHash, Long hostId) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public T initializeDataIfNeeded(Long hostId, boolean regenerateHash) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public void updateData(T update) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public final void resetData(Long hostId) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public final void onHostRemoved(Long hostId)
Copyright © 2022 Apache Software Foundation. All rights reserved.