public interface VirtualNetworkMastershipStore extends VirtualStore<MastershipEvent,MastershipStoreDelegate>
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<DeviceId> |
getDevices(NetworkId networkId,
NodeId nodeId)
Returns the devices that a controller instance is master of.
|
NodeId |
getMaster(NetworkId networkId,
DeviceId deviceId)
Returns the master for a device.
|
RoleInfo |
getNodes(NetworkId networkId,
DeviceId deviceId)
Returns the master and backup nodes for a device.
|
MastershipRole |
getRole(NetworkId networkId,
NodeId nodeId,
DeviceId deviceId)
Returns the role of a device for a specific controller instance.
|
MastershipTerm |
getTermFor(NetworkId networkId,
DeviceId deviceId)
Returns the current master and number of past mastership hand-offs
(terms) for a device.
|
void |
relinquishAllRole(NetworkId networkId,
NodeId nodeId)
Removes all the roles for the specified controller instance.
|
java.util.concurrent.CompletableFuture<MastershipEvent> |
relinquishRole(NetworkId networkId,
NodeId nodeId,
DeviceId deviceId)
Allows a controller instance to give up its current role for a device.
|
java.util.concurrent.CompletableFuture<MastershipRole> |
requestRole(NetworkId networkId,
DeviceId deviceId)
Requests role of the local node for the specified device.
|
java.util.concurrent.CompletableFuture<MastershipEvent> |
setMaster(NetworkId networkId,
NodeId nodeId,
DeviceId deviceId)
Sets a device's role for a specified controller instance.
|
java.util.concurrent.CompletableFuture<MastershipEvent> |
setStandby(NetworkId networkId,
NodeId nodeId,
DeviceId deviceId)
Sets a controller instance's mastership role to STANDBY for a device.
|
hasDelegate, setDelegate, unsetDelegatejava.util.concurrent.CompletableFuture<MastershipRole> requestRole(NetworkId networkId, DeviceId deviceId)
networkId - the virtual network identifierdeviceId - the device identifierMastershipRole getRole(NetworkId networkId, NodeId nodeId, DeviceId deviceId)
networkId - virtual network identifiernodeId - the instance identifierdeviceId - the device identifiersNodeId getMaster(NetworkId networkId, DeviceId deviceId)
networkId - virtual network identifierdeviceId - the device identifierRoleInfo getNodes(NetworkId networkId, DeviceId deviceId)
networkId - virtual network identifierdeviceId - the device identifierjava.util.Set<DeviceId> getDevices(NetworkId networkId, NodeId nodeId)
networkId - virtual network identifiernodeId - the instance identifierjava.util.concurrent.CompletableFuture<MastershipEvent> setMaster(NetworkId networkId, NodeId nodeId, DeviceId deviceId)
networkId - virtual network identifiernodeId - controller instance identifierdeviceId - device identifierMastershipTerm getTermFor(NetworkId networkId, DeviceId deviceId)
networkId - virtual network identifierdeviceId - the device identifierjava.util.concurrent.CompletableFuture<MastershipEvent> setStandby(NetworkId networkId, NodeId nodeId, DeviceId deviceId)
networkId - virtual network identifiernodeId - the controller instance identifierdeviceId - device to revoke mastership role forjava.util.concurrent.CompletableFuture<MastershipEvent> relinquishRole(NetworkId networkId, NodeId nodeId, DeviceId deviceId)
networkId - virtual network identifiernodeId - the controller instance identifierdeviceId - device to revoke mastership role forvoid relinquishAllRole(NetworkId networkId, NodeId nodeId)
networkId - virtual network identifiernodeId - the controller instance identifier