@ThreadSafe public class ConfigurationStore extends Object
Constructor and Description |
---|
ConfigurationStore()
Constructs a new
ConfigurationStore . |
Modifier and Type | Method and Description |
---|---|
Map<Address,List<ConfigRecord>> |
getConfMap() |
List<Address> |
getLiveNodeAddresses() |
void |
handleNodeDelete(Address address)
Updates configuration when a node delete.
|
void |
handleNodeLost(Address address)
Updates configuration when a live node becomes lost.
|
void |
lostNodeFound(Address address)
Updates configuration when a lost node is found.
|
void |
registerChangeListener(Runnable function)
Registers callback functions to use when this store has any changes.
|
void |
registerNewConf(Address address,
List<ConfigProperty> configList)
Registers new configuration information.
|
void |
reset()
Resets the default
ConfigurationStore . |
public ConfigurationStore()
ConfigurationStore
.public void reset()
ConfigurationStore
.public void registerNewConf(Address address, List<ConfigProperty> configList)
address
- the node addressconfigList
- the configuration of this nodepublic void handleNodeLost(Address address)
address
- the node addresspublic void lostNodeFound(Address address)
address
- the node addresspublic void handleNodeDelete(Address address)
address
- the node addresspublic Map<Address,List<ConfigRecord>> getConfMap()
public List<Address> getLiveNodeAddresses()
public void registerChangeListener(Runnable function)
function
- the function to registerCopyright © 2023. All Rights Reserved.