@ThreadSafe public class ServerConfigurationStore extends Object
Constructor and Description |
---|
ServerConfigurationStore()
Constructs a new
ServerConfigurationStore . |
Modifier and Type | Method and Description |
---|---|
Map<Address,List<ConfigRecord>> |
getConfMap() |
List<Address> |
getLiveNodeAddresses() |
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
ServerConfigurationStore . |
public ServerConfigurationStore()
ServerConfigurationStore
.public void reset()
ServerConfigurationStore
.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 Map<Address,List<ConfigRecord>> getConfMap()
public List<Address> getLiveNodeAddresses()
public void registerChangeListener(Runnable function)
function
- the function to registerCopyright © 2023. All Rights Reserved.