Class PeerManagerImpl.pieceFacade
java.lang.Object
com.biglybt.pifimpl.local.peers.PeerManagerImpl.pieceFacade
- All Implemented Interfaces:
Piece
- Enclosing class:
PeerManagerImpl
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintnumber of requests that are available to be madeintgetIndex()intReserve this piece for a given peer - no other peer will be asked for the piecebooleanisDone()booleanbooleanindicates if this piece is free and available to be allocated for download not done, needed and not downloadingbooleanisNeeded()voidsetReservedFor(Peer peer) Set the peer that will be responsible for downloading the piece
-
Field Details
-
index
private final int index
-
-
Constructor Details
-
pieceFacade
protected pieceFacade(int _index)
-
-
Method Details
-
getIndex
-
getLength
-
isDone
-
isNeeded
-
isDownloading
public boolean isDownloading()- Specified by:
isDownloadingin interfacePiece
-
isFullyAllocatable
public boolean isFullyAllocatable()Description copied from interface:Pieceindicates if this piece is free and available to be allocated for download not done, needed and not downloading- Specified by:
isFullyAllocatablein interfacePiece- Returns:
-
getAllocatableRequestCount
public int getAllocatableRequestCount()Description copied from interface:Piecenumber of requests that are available to be made- Specified by:
getAllocatableRequestCountin interfacePiece- Returns:
-
getReservedFor
Description copied from interface:PieceReserve this piece for a given peer - no other peer will be asked for the piece- Specified by:
getReservedForin interfacePiece- Returns:
-
setReservedFor
Description copied from interface:PieceSet the peer that will be responsible for downloading the piece- Specified by:
setReservedForin interfacePiece- Parameters:
peer-
-