tuweni / org.apache.tuweni.plumtree / State / <init>

<init>

State(peerRepository: PeerRepository!, messageHashingFunction: MessageHashing!, messageSender: MessageSender!, messageListener: MessageListener!, messageValidator: MessageValidator!, peerPruningFunction: PeerPruning!)

Constructor using default time constants.

Parameters

peerRepository - PeerRepository!: the peer repository to use to store and access peer information.

messageHashingFunction - MessageHashing!: the function to use to hash messages into hashes to compare them.

messageSender - MessageSender!: a function abstracting sending messages to other peers.

messageListener - MessageListener!: a function consuming messages when they are gossiped.

messageValidator - MessageValidator!: a function validating messages before they are gossiped to other peers.

peerPruningFunction - PeerPruning!: a function deciding whether to prune peers.

State(peerRepository: PeerRepository!, messageHashingFunction: MessageHashing!, messageSender: MessageSender!, messageListener: MessageListener!, messageValidator: MessageValidator!, peerPruningFunction: PeerPruning!, graftDelay: Long, lazyQueueInterval: Long)

Default constructor.

Parameters

peerRepository - PeerRepository!: the peer repository to use to store and access peer information.

messageHashingFunction - MessageHashing!: the function to use to hash messages into hashes to compare them.

messageSender - MessageSender!: a function abstracting sending messages to other peers.

messageListener - MessageListener!: a function consuming messages when they are gossiped.

messageValidator - MessageValidator!: a function validating messages before they are gossiped to other peers.

peerPruningFunction - PeerPruning!: a function deciding whether to prune peers.

graftDelay - Long: delay in milliseconds to apply before this peer grafts an other peer when it finds that peer has data it misses.

lazyQueueInterval - Long: the interval in milliseconds between sending messages to lazy peers.