Class FullPieceSelect
- java.lang.Object
-
- org.johnnei.javatorrent.torrent.algos.pieceselector.FullPieceSelect
-
- All Implemented Interfaces:
IPieceSelector
public class FullPieceSelect extends Object implements IPieceSelector
A Piece selection algorithm which favors completing a started piece over starting a second piece. This selector also favors rarer pieces over highly available ones (as advised by BEP #3).- Author:
- Johnnei
-
-
Constructor Summary
Constructors Constructor Description FullPieceSelect(Torrent torrent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Piece>getPieceForPeer(Peer peer)Gets the next piece to download
-
-
-
Constructor Detail
-
FullPieceSelect
public FullPieceSelect(Torrent torrent)
-
-
Method Detail
-
getPieceForPeer
public Optional<Piece> getPieceForPeer(Peer peer)
Description copied from interface:IPieceSelectorGets the next piece to download- Specified by:
getPieceForPeerin interfaceIPieceSelector- Returns:
- The piece info of the next piece to download or null if no next piece is available
-
-