Groovy Documentation

org.linkedin.glu.agent.impl.storage
[Groovy] Class DualWriteStorage

java.lang.Object
  org.linkedin.glu.agent.impl.storage.FilteredStorage
      org.linkedin.glu.agent.impl.storage.DualWriteStorage

class DualWriteStorage
extends FilteredStorage

All the reads are delegated to the readWriteStorage, all the writes are dispatched to both. This class is thread safe.

Authors:
ypujante@linkedin.com


Constructor Summary
DualWriteStorage(Storage readWriteStorage, WriteOnlyStorage writeOnlyStorage)

 
Method Summary
void clearAllStates()

void clearState(MountPoint mountPoint)

WriteOnlyStorage getWriteOnlyStorage()

AgentProperties saveAgentProperties(AgentProperties agentProperties)

void storeState(MountPoint mountPoint, java.lang.Object state)

void sync()

Synchronizes the 2 storages (the source of truth is supposed to be the readWriteStorage).

AgentProperties updateAgentProperty(java.lang.String name, java.lang.String value)

 
Methods inherited from class FilteredStorage
clearAllStates, clearState, getMountPoints, getStorage, loadAgentProperties, loadState, saveAgentProperties, storeState, updateAgentProperty
 

Constructor Detail

DualWriteStorage

DualWriteStorage(Storage readWriteStorage, WriteOnlyStorage writeOnlyStorage)


 
Method Detail

clearAllStates

void clearAllStates()


clearState

void clearState(MountPoint mountPoint)


getWriteOnlyStorage

WriteOnlyStorage getWriteOnlyStorage()


saveAgentProperties

@Override
AgentProperties saveAgentProperties(AgentProperties agentProperties)


storeState

void storeState(MountPoint mountPoint, java.lang.Object state)


sync

void sync()
Synchronizes the 2 storages (the source of truth is supposed to be the readWriteStorage).


updateAgentProperty

@Override
AgentProperties updateAgentProperty(java.lang.String name, java.lang.String value)


 

Groovy Documentation