Package org.onosproject.mastership
Interface MastershipAdminService
-
public interface MastershipAdminService
Service for administering the inventory of device masterships.
-
-
Field Summary
Fields Modifier and Type Field Description static long
TIMEOUT_MILLIS
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
balanceRoles()
Balances the mastership to be shared as evenly as possibly by all online instances.CompletableFuture<Void>
setRole(NodeId instance, DeviceId deviceId, MastershipRole role)
Applies the current mastership role for the specified device.default void
setRoleSync(NodeId instance, DeviceId deviceId, MastershipRole role)
Synchronous version of setRole.
-
-
-
Field Detail
-
TIMEOUT_MILLIS
static final long TIMEOUT_MILLIS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setRole
CompletableFuture<Void> setRole(NodeId instance, DeviceId deviceId, MastershipRole role)
Applies the current mastership role for the specified device.- Parameters:
instance
- controller instance identifierdeviceId
- device identifierrole
- requested role- Returns:
- future that is completed when the role is set
-
setRoleSync
default void setRoleSync(NodeId instance, DeviceId deviceId, MastershipRole role)
Synchronous version of setRole. Applies the current mastership role for the specified device.- Parameters:
instance
- controller instance identifierdeviceId
- device identifierrole
- requested role
-
balanceRoles
void balanceRoles()
Balances the mastership to be shared as evenly as possibly by all online instances.
-
-