Class CyclonView
java.lang.Object
org.drasyl.handler.membership.cyclon.CyclonView
Local peer's (partial) view of the network.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(CyclonNeighbor neighbor) intcapacity()voidbooleanisEmpty()static CyclonViewof(int capacity, Set<CyclonNeighbor> neighbors) static CyclonViewofKeys(int capacity, Collection<DrasylAddress> neighbors) randomNeighbors(int n) booleanremove(CyclonNeighbor neighbor) toString()voidupdate(Set<CyclonNeighbor> fullReceivedNeighbors, Set<CyclonNeighbor> replaceCandidates)
-
Method Details
-
toString
-
isEmpty
public boolean isEmpty() -
increaseAgeByOne
public void increaseAgeByOne() -
highestAgeAndOtherRandomNeighbors
-
randomNeighbors
-
getNeighbors
-
update
public void update(Set<CyclonNeighbor> fullReceivedNeighbors, Set<CyclonNeighbor> replaceCandidates) -
capacity
public int capacity() -
remove
-
add
-
of
-
ofKeys
-