public class TorrentWorker extends Object
Constructor and Description |
---|
TorrentWorker(TorrentId torrentId,
IMessageDispatcher dispatcher,
IConnectionSource connectionSource,
IPeerWorkerFactory peerWorkerFactory,
Supplier<LocalBitfield> bitfieldSupplier,
Supplier<Assignments> assignmentsSupplier,
Supplier<BitfieldBasedStatistics> statisticsSupplier,
EventSource eventSource,
Config config) |
Modifier and Type | Method and Description |
---|---|
ConnectionState |
getConnectionState(ConnectionKey connectionKey)
Get the current state of a connection with a particular peer.
|
Set<ConnectionKey> |
getPeers()
Get all peers, that this torrent worker is currently working with.
|
void |
removePeer(ConnectionKey connectionKey)
Called when a peer leaves the torrent processing session.
|
public TorrentWorker(TorrentId torrentId, IMessageDispatcher dispatcher, IConnectionSource connectionSource, IPeerWorkerFactory peerWorkerFactory, Supplier<LocalBitfield> bitfieldSupplier, Supplier<Assignments> assignmentsSupplier, Supplier<BitfieldBasedStatistics> statisticsSupplier, EventSource eventSource, Config config)
public void removePeer(ConnectionKey connectionKey)
public Set<ConnectionKey> getPeers()
public ConnectionState getConnectionState(ConnectionKey connectionKey)
Copyright © 2016–2021. All rights reserved.