T
- event with hash to control versionpublic abstract class AgentClusterDataHolder<T extends STOMPEvent & Hashable> extends AgentDataHolder<T>
Modifier and Type | Field and Description |
---|---|
protected STOMPUpdatePublisher |
STOMPUpdatePublisher |
updateLock
Constructor and Description |
---|
AgentClusterDataHolder() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
getCurrentData()
Builds an update with the full set of current data.
|
T |
getData() |
T |
getUpdateIfChanged(String agentHash) |
protected abstract boolean |
handleUpdate(T update)
Handle an incremental update to the data.
|
protected void |
initializeDataIfNeeded(boolean regenerateHash) |
boolean |
updateData(T update)
Template method to update the data.
|
getEmptyData, getHash, getHash, isIdentifierValid, regenerateDataIdentifiers
@Inject protected STOMPUpdatePublisher STOMPUpdatePublisher
public T getUpdateIfChanged(String agentHash) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected abstract T getCurrentData() throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected abstract boolean handleUpdate(T update) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public boolean updateData(T update) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected final void initializeDataIfNeeded(boolean regenerateHash) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public final T getData()
Copyright © 2022 Apache Software Foundation. All rights reserved.