interface PeerRepository
(source)
A repository of peers, organized for Ethereum and other blockchain and peer-to-peer systems.
addConnection |
abstract fun addConnection(peer: Peer, identity: Identity): Unit |
markConnectionInactive |
abstract fun markConnectionInactive(peer: Peer, identity: Identity): Unit |
peerDiscoveredAt |
abstract fun peerDiscoveredAt(peer: Peer, time: Long): Unit |
randomPeer |
abstract fun randomPeer(): Peer? |
storeIdentity |
abstract fun storeIdentity(networkInterface: String, port: Int, publicKey: PublicKey): Identity |
storePeer |
abstract fun storePeer(id: Identity, lastContacted: Instant?, lastDiscovered: Instant?): Peer |
EthereumPeerRepository |
A peer repository of peers implementing the eth subprotocol. interface EthereumPeerRepository : PeerRepository |
MemoryPeerRepository |
Memory-backed peer repository. class MemoryPeerRepository : PeerRepository |