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 TypeMethodDescriptionboolean
add
(CyclonNeighbor neighbor) int
capacity()
void
boolean
isEmpty()
static CyclonView
of
(int capacity, Set<CyclonNeighbor> neighbors) static CyclonView
ofKeys
(int capacity, Collection<DrasylAddress> neighbors) randomNeighbors
(int n) boolean
remove
(CyclonNeighbor neighbor) toString()
void
update
(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
-