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