public interface RoleAdvisor
Modifier and Type | Method and Description |
---|---|
boolean |
isEnforcingRegions()
Returns
true if the service is actively enforcing regions. |
boolean |
isMasterFor(DataPathId dpid)
Returns
true if the local controller instance has the
Master role for the specified data path; false
otherwise. |
boolean |
isValidRegionAddress(IpAddress ip)
Returns
true if the given address is defined in a region. |
void |
postHandshake(DataPathId dpid,
IpAddress ip,
ProtocolVersion pv,
Runnable task,
Runnable ownerOnlyTask)
Called to inform the service of a post-handshake.
|
void |
preDisconnected(DataPathId dpid,
IpAddress ip,
ProtocolVersion pv)
Called to inform the service of a disconnection.
|
boolean isMasterFor(DataPathId dpid)
true
if the local controller instance has the
Master role for the specified data path; false
otherwise.dpid
- the target datapathtrue
if this controller is Master;
false
otherwiseboolean isEnforcingRegions()
true
if the service is actively enforcing regions.true
if regions are being enforcedboolean isValidRegionAddress(IpAddress ip)
true
if the given address is defined in a region.true
if the given address is defined in a region.void postHandshake(DataPathId dpid, IpAddress ip, ProtocolVersion pv, Runnable task, Runnable ownerOnlyTask)
dpid
- data path ID of the connectionip
- device IP of the connectionpv
- protocol versiontask
- post handshake task to runownerOnlyTask
- addition post handshake task to run if ownervoid preDisconnected(DataPathId dpid, IpAddress ip, ProtocolVersion pv)
dpid
- data path ID of the connectionip
- device IP of the connectionpv
- protocol versionCopyright © 2015. All Rights Reserved.