tuweni / org.apache.tuweni.plumtree / PeerRepository

PeerRepository

interface PeerRepository (source)

Repository of active peers associating with a gossip tree.

Functions

addEager

abstract fun addEager(peer: Peer!): Unit

considerNewPeer

Proposes a peer as a new peer.

abstract fun considerNewPeer(peer: Peer!): Unit

eagerPushPeers

Provides the list of all eager peers connected.

abstract fun eagerPushPeers(): MutableCollection<Peer!>!

lazyPushPeers

Provides the list of all lazy peers connected.

abstract fun lazyPushPeers(): MutableCollection<Peer!>!

moveToEager

Moves a peer to the list of eager peers.

abstract fun moveToEager(peer: Peer!): Unit

moveToLazy

Moves a peer to the list of lazy peers

abstract fun moveToLazy(peer: Peer!): Boolean

peers

Provides the list of all the peers connected.

abstract fun peers(): MutableList<Peer!>!

removePeer

Removes a peer from the repository

abstract fun removePeer(peer: Peer!): Unit

Inheritors

EphemeralPeerRepository

In-memory peer repository.

class EphemeralPeerRepository : PeerRepository