Packages that use PartialPiece
Package
Description
I2P version of the Snark BitTorrent client, enhanced for I2P: peers are I2P destinations, torrents can be served anonymously as hidden services, and metadata carries I2P-specific comment fields.
Uses of PartialPiece in org.klomp.snark
Classes in org.klomp.snark that implement interfaces with type arguments of type PartialPieceModifier and TypeClassDescription(package private) classRepresents a piece of a torrent being downloaded, storing partial data either on the heap or in a temporary file if the piece is large.Fields in org.klomp.snark declared as PartialPieceModifier and TypeFieldDescriptionprivate final PartialPieceRequest.pieceThe piece this request covers.Fields in org.klomp.snark with type parameters of type PartialPieceModifier and TypeFieldDescriptionprivate final List<PartialPiece> PeerCoordinator.partialPiecesPieces received but not yet complete.Methods in org.klomp.snark that return PartialPieceModifier and TypeMethodDescriptionPeerCoordinator.getPartialPiece(Peer peer, int piece) Allocates a PartialPiece for a specific suggested piece, or returns null if the piece is not wanted, is already being fetched, or the peer is already fetching it.PeerCoordinator.getPartialPiece(Peer peer, BitField havePieces) Return partial piece to the PeerState if it's still wanted and peer has it.PeerCoordinator.getPartialPiece(Peer peer, BitField havePieces, Set<Integer> allowed) Return partial piece to the PeerState if it's still wanted and peer has it.PeerListener.getPartialPiece(Peer peer, int piece) Called when the peer suggests a specific piece via a BEP 6 suggest message.PeerListener.getPartialPiece(Peer peer, BitField havePieces) Called when a peer has connected and there may be a partially downloaded piece that the coordinatorator can give the peer task.PeerListener.getPartialPiece(Peer peer, BitField havePieces, Set<Integer> allowed) Called when a peer has connected and there may be a partially downloaded piece that the coordinator can give the peer task.Request.getPartialPiece()The PartialPiece this Request is for.Methods in org.klomp.snark with parameters of type PartialPieceModifier and TypeMethodDescription(package private) booleanMetaInfo.checkPiece(PartialPiece pp) Checks a piece against the stored hashes using a PartialPiece.intPartialPiece.compareTo(PartialPiece other) Compares this piece with another by piece number, highest priority first, then by highest downloaded first.booleanPeerCoordinator.gotPiece(Peer peer, PartialPiece pp) Returns false if the piece is no good (according to the hash).booleanPeerListener.gotPiece(Peer peer, PartialPiece piece) Called when a piece is received from the peer.booleanStorage.putPiece(PartialPiece pp) Put the piece in the Storage if it is correct.private voidStorage.writePiece(PartialPiece pp, int piece, boolean shouldPreallocate, boolean forceRW) Write a (hash-verified) partial piece to the data files.Constructors in org.klomp.snark with parameters of type PartialPieceModifierConstructorDescription(package private)Request(PartialPiece piece, int off) Dummy Request forPeerState.returnPartialPieces(); len is zero.(package private)Request(PartialPiece piece, int off, int len) Creates a new Request.