tuweni / org.apache.tuweni.rlpx / WireConnectionRepository

WireConnectionRepository

interface WireConnectionRepository (source)

A repository managing wire connections.

Functions

add

abstract fun add(wireConnection: WireConnection): Unit

Adds a new wire connection to the repository.

asIterable

abstract fun asIterable(): MutableIterable<WireConnection>

Provides a view of the wire connections as an iterable. There is no guarantee of sorting wire connections.

close

abstract fun close(): Unit

Closes the repository. After it has been closed, the repository should no longer be able to add or retrieve connections.

get

abstract fun get(id: String): WireConnection

Gets a wire connection by its identifier, as provided by org.apache.tuweni.rlpx.wire.DefaultWireConnection#id

Inheritors

MemoryWireConnectionsRepository

open class MemoryWireConnectionsRepository : WireConnectionRepository

In-memory implementation of the wire connections repository.