public class ClusterView extends Object
| Modifier and Type | Field and Description |
|---|---|
long |
masterViewId |
| Modifier and Type | Method and Description |
|---|---|
void |
add(SystemAdvertisement adv)
Adds a system advertisement to the view.
|
void |
clear()
Removes all of the elements from this set (optional operation).
|
boolean |
containsKey(PeerID id) |
SystemAdvertisement |
get(PeerID id)
Retrieves a system advertisement from a the table.
|
long |
getClusterViewId()
Returns the cluster view ID
|
SystemAdvertisement |
getMasterCandidate()
Returns the top node on the list
|
List<String> |
getPeerNamesInView()
Returns the list of peer names in the peer id sorted order from the cluster view
|
int |
getSize()
Gets the viewSize attribute of the ClusterView object
|
List<SystemAdvertisement> |
getView()
Returns a sorted list containing the System Advertisements of peers in PeerId sorted order
|
boolean |
isFirst(SystemAdvertisement advertisement)
Determines whether this node is at the top of the list
|
public SystemAdvertisement get(PeerID id)
id - instance idpublic void add(SystemAdvertisement adv)
adv - adds a system advertisement to the viewpublic boolean containsKey(PeerID id)
public List<SystemAdvertisement> getView()
public List<String> getPeerNamesInView()
public int getSize()
public SystemAdvertisement getMasterCandidate()
public boolean isFirst(SystemAdvertisement advertisement)
advertisement - the advertisement to testpublic long getClusterViewId()
public void clear()
Copyright © 2017–2020 Eclipse Foundation. All rights reserved.