public interface MastershipService
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(MastershipListener listener)
Adds the specified mastership change listener.
|
Set<DeviceId> |
getDevicesOf(NodeId nodeId)
Returns the devices for which a controller is master.
|
MastershipRole |
getLocalRole(DeviceId deviceId)
Returns the role of the local node for the specified device, without
triggering master selection.
|
NodeId |
getMasterFor(DeviceId deviceId)
Returns the current master for a given device.
|
RoleInfo |
getNodesFor(DeviceId deviceId)
Returns controllers connected to a given device, in order of
preference.
|
void |
relinquishMastership(DeviceId deviceId)
Abandons mastership of the specified device on the local node thus
forcing selection of a new master.
|
void |
removeListener(MastershipListener listener)
Removes the specified mastership change listener.
|
MastershipRole |
requestRoleFor(DeviceId deviceId)
Returns the mastership status of the local controller for a given
device forcing master selection if necessary.
|
MastershipRole getLocalRole(DeviceId deviceId)
deviceId - the the identifier of the deviceMastershipRole requestRoleFor(DeviceId deviceId)
deviceId - the the identifier of the devicevoid relinquishMastership(DeviceId deviceId)
deviceId - the identifier of the deviceNodeId getMasterFor(DeviceId deviceId)
deviceId - the identifier of the deviceRoleInfo getNodesFor(DeviceId deviceId)
deviceId - the identifier of the deviceSet<DeviceId> getDevicesOf(NodeId nodeId)
nodeId - the ID of the controllervoid addListener(MastershipListener listener)
listener - the mastership listenervoid removeListener(MastershipListener listener)
listener - the mastership listenerCopyright © 2015. All rights reserved.