public interface MastershipAdminService
Modifier and Type | Field and Description |
---|---|
static long |
TIMEOUT_MILLIS |
Modifier and Type | Method and 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.
|
static final long TIMEOUT_MILLIS
CompletableFuture<Void> setRole(NodeId instance, DeviceId deviceId, MastershipRole role)
instance
- controller instance identifierdeviceId
- device identifierrole
- requested roledefault void setRoleSync(NodeId instance, DeviceId deviceId, MastershipRole role)
instance
- controller instance identifierdeviceId
- device identifierrole
- requested rolevoid balanceRoles()