Packages that use Piece
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 Piece in org.klomp.snark
Classes in org.klomp.snark that implement interfaces with type arguments of type PieceModifier and TypeClassDescription(package private) classRepresents a torrent piece and tracks which peers have it and are requesting it.Fields in org.klomp.snark declared as PieceModifier and TypeFieldDescriptionprivate final PiecePartialPiece.pieceThe piece being filled in.(package private) final PiecePeerCoordinator.StalledPiece.pieceThe piece that stalled.Fields in org.klomp.snark with type parameters of type PieceModifier and TypeFieldDescriptionPeerCoordinator.wantedMapIndex of wantedPieces by piece id, for O(1) lookups.PeerCoordinator.wantedPiecesThe wanted pieces.Methods in org.klomp.snark that return PieceModifier and TypeMethodDescriptionprivate PieceReturns one of pieces in the given BitField that is still wanted or null if none of the given pieces are wanted.private PieceReturns one of the claimed pieces in the given BitField that is still wanted or null if none of the given pieces are wanted.Methods in org.klomp.snark with parameters of type PieceModifier and TypeMethodDescriptionintCompares by highest priority first, then by rarest first.private voidPeerCoordinator.expireStalledPiece(Piece p, Set<PeerID> requesters) Cancels the outstanding requests for a stalled piece and returns its partial data to the partial piece list, so the piece can be re-requested from other peers.(package private) static booleanChecks if the piece has been requested but has received no data for longer than the timeout.Constructors in org.klomp.snark with parameters of type PieceModifierConstructorDescriptionPartialPiece(Piece piece, int len, File tempDir) A PartialPiece for the given piece with the specified length.PartialPiece(Piece piece, int len, File tempDir, MetaInfo meta) A PartialPiece for the given piece with the specified length.(package private)StalledPiece(Piece piece, Set<PeerID> requesters) Records one stalled piece.