public interface MastershipStore extends Store<MastershipEvent,MastershipStoreDelegate>
| Modifier and Type | Method and Description |
|---|---|
Set<DeviceId> |
getDevices(NodeId nodeId)
Returns the devices that a controller instance is master of.
|
NodeId |
getMaster(DeviceId deviceId)
Returns the master for a device.
|
RoleInfo |
getNodes(DeviceId deviceId)
Returns the master and backup nodes for a device.
|
MastershipRole |
getRole(NodeId nodeId,
DeviceId deviceId)
Returns the role of a device for a specific controller instance.
|
MastershipTerm |
getTermFor(DeviceId deviceId)
Returns the current master and number of past mastership hand-offs
(terms) for a device.
|
MastershipEvent |
relinquishRole(NodeId nodeId,
DeviceId deviceId)
Allows a controller instance to give up its current role for a device.
|
MastershipRole |
requestRole(DeviceId deviceId)
Requests role of the local node for the specified device.
|
MastershipEvent |
setMaster(NodeId nodeId,
DeviceId deviceId)
Sets a device's role for a specified controller instance.
|
MastershipEvent |
setStandby(NodeId nodeId,
DeviceId deviceId)
Sets a controller instance's mastership role to STANDBY for a device.
|
hasDelegate, setDelegate, unsetDelegateMastershipRole requestRole(DeviceId deviceId)
deviceId - device identifierMastershipRole getRole(NodeId nodeId, DeviceId deviceId)
nodeId - the instance identifierdeviceId - the device identifiersNodeId getMaster(DeviceId deviceId)
deviceId - the device identifierRoleInfo getNodes(DeviceId deviceId)
deviceId - the device identifierSet<DeviceId> getDevices(NodeId nodeId)
nodeId - the instance identifierMastershipEvent setMaster(NodeId nodeId, DeviceId deviceId)
nodeId - controller instance identifierdeviceId - device identifierMastershipTerm getTermFor(DeviceId deviceId)
deviceId - the device identifierMastershipEvent setStandby(NodeId nodeId, DeviceId deviceId)
nodeId - the controller instance identifierdeviceId - device to revoke mastership role forMastershipEvent relinquishRole(NodeId nodeId, DeviceId deviceId)
nodeId - the controller instance identifierdeviceId - device to revoke mastership role forCopyright © 2015. All rights reserved.