Package com.biglybt.pif.peers
Interface Piece
-
- All Known Implementing Classes:
PeerManagerImpl.pieceFacade
public interface Piece
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getAllocatableRequestCount()
number of requests that are available to be madeint
getIndex()
int
getLength()
Peer
getReservedFor()
Reserve this peice for a given peer - no other peer will be asked for the pieceboolean
isDone()
boolean
isDownloading()
boolean
isFullyAllocatable()
indicates if this piece is free and available to be allocated for download not done, needed and not downloadingboolean
isNeeded()
void
setReservedFor(Peer peer)
Set the peer that will be responsible for downloading the piece
-
-
-
Method Detail
-
getIndex
int getIndex()
-
getLength
int getLength()
-
isDone
boolean isDone()
-
isNeeded
boolean isNeeded()
-
isDownloading
boolean isDownloading()
-
isFullyAllocatable
boolean isFullyAllocatable()
indicates if this piece is free and available to be allocated for download not done, needed and not downloading- Returns:
-
getAllocatableRequestCount
int getAllocatableRequestCount()
number of requests that are available to be made- Returns:
-
getReservedFor
Peer getReservedFor()
Reserve this peice for a given peer - no other peer will be asked for the piece- Returns:
-
setReservedFor
void setReservedFor(Peer peer)
Set the peer that will be responsible for downloading the piece- Parameters:
peer
-
-
-