Package org.onosproject.mastership
Interface MastershipAdminService
-
public interface MastershipAdminServiceService for administering the inventory of device masterships.
-
-
Field Summary
Fields Modifier and Type Field Description static longTIMEOUT_MILLIS
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidbalanceRoles()Balances the mastership to be shared as evenly as possibly by all online instances.java.util.concurrent.CompletableFuture<java.lang.Void>setRole(NodeId instance, DeviceId deviceId, MastershipRole role)Applies the current mastership role for the specified device.default voidsetRoleSync(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
java.util.concurrent.CompletableFuture<java.lang.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.
-
-