class MemoryPeerRepository : PeerRepository
(source)
Memory-backed peer repository.
<init> |
Memory-backed peer repository. MemoryPeerRepository() |
connections |
val connections: ConcurrentHashMap<String, Connection> |
identities |
val identities: HashSet<Identity> |
peerMap |
val peerMap: ConcurrentHashMap<Identity, Peer> |
addConnection |
fun addConnection(peer: Peer, identity: Identity): Unit |
markConnectionInactive |
fun markConnectionInactive(peer: Peer, identity: Identity): Unit |
peerDiscoveredAt |
fun peerDiscoveredAt(peer: Peer, time: Long): Unit |
randomPeer |
fun randomPeer(): Peer? |
storeIdentity |
fun storeIdentity(networkInterface: String, port: Int, publicKey: PublicKey): Identity |
storePeer |
fun storePeer(id: Identity, lastContacted: Instant?, lastDiscovered: Instant?): Peer |