public class ClusterViewManager extends Object
| Constructor and Description |
|---|
ClusterViewManager(SystemAdvertisement advertisement,
ClusterManager manager,
List<ClusterViewEventListener> listeners)
Constructor for the ClusterViewManager object
|
| Modifier and Type | Method and Description |
|---|---|
void |
addClusterViewEventListener(ClusterViewEventListener listener) |
boolean |
containsKey(PeerID id) |
boolean |
containsKey(PeerID id,
boolean debug) |
SystemAdvertisement |
get(PeerID id)
Retrieves a system advertisement from a the table
|
PeerID |
getID(String name) |
ClusterView |
getLocalView()
Returns a sorted localView
|
SystemAdvertisement |
getMaster()
Gets the master advertisement
|
long |
getMasterViewID() |
int |
getViewSize()
Gets the viewSize attribute of the ClusterViewManager object
|
int |
indexOf(PeerID id)
the index of id this view, or -1 if this view does not contain this element.
|
boolean |
isFirst()
Determines whether this node is at the top of the list
|
boolean |
isMaster()
Determines whether this node is the Master
|
void |
removeClusterViewEventListener(ClusterViewEventListener listener) |
void |
setClusterStoppingState(SystemAdvertisement adv) |
void |
setInDoubtPeerState(SystemAdvertisement adv) |
void |
setMasterViewID(long masterViewID) |
void |
setPeerNoLongerInDoubtState(SystemAdvertisement adv) |
void |
setPeerReadyState(SystemAdvertisement adv) |
void |
setPeerStoppingState(SystemAdvertisement adv) |
void |
start() |
public ClusterViewManager(SystemAdvertisement advertisement, ClusterManager manager, List<ClusterViewEventListener> listeners)
advertisement - the advertisement of the instance associated with this objectmanager - the cluster managerlisteners - List of ClusterViewEventListenerpublic void start()
public void addClusterViewEventListener(ClusterViewEventListener listener)
public void removeClusterViewEventListener(ClusterViewEventListener listener)
public SystemAdvertisement getMaster()
public SystemAdvertisement get(PeerID id)
id - instance idpublic boolean containsKey(PeerID id)
public boolean containsKey(PeerID id, boolean debug)
public ClusterView getLocalView()
public int getViewSize()
public boolean isMaster()
public boolean isFirst()
public int indexOf(PeerID id)
id - idpublic void setInDoubtPeerState(SystemAdvertisement adv)
public void setPeerStoppingState(SystemAdvertisement adv)
public void setClusterStoppingState(SystemAdvertisement adv)
public void setPeerNoLongerInDoubtState(SystemAdvertisement adv)
public long getMasterViewID()
public void setMasterViewID(long masterViewID)
public void setPeerReadyState(SystemAdvertisement adv)
Copyright © 2017–2020 Eclipse Foundation. All rights reserved.