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, regenerateDataIdentifiersprotected abstract T getCurrentData(Long hostId) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariExceptionprotected abstract T handleUpdate(T current, T update) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariExceptionpublic T getUpdateIfChanged(String agentHash, Long hostId) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariExceptionpublic T initializeDataIfNeeded(Long hostId, boolean regenerateHash) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariExceptionpublic void updateData(T update) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariExceptionpublic final void resetData(Long hostId) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariExceptionpublic final void onHostRemoved(Long hostId)
Copyright © 2022 Apache Software Foundation. All rights reserved.