Package com.biglybt.core.disk
Interface DiskManagerReadRequest
- All Superinterfaces:
DiskManagerRequest
,PeerReadRequest
- All Known Implementing Classes:
DiskManagerReadRequestImpl
This class represents a Bittorrent Request.
and a time stamp to know when it was created.
Request may expire after some time, which is used to determine who is snubbed.
-
Field Summary
Fields inherited from interface com.biglybt.pif.peers.PeerReadRequest
NORMAL_REQUEST_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
We override the equals method 2 requests are equals if all their bt fields (piece number, offset, length) are equalboolean
getFlush()
int
int
int
long
long
boolean
int
hashCode()
boolean
void
setFlush
(boolean flush) If flush is set then data held in memory will be flushed to disk during the read operationvoid
void
setTimeSent
(long time) void
setUseCache
(boolean cache) Methods inherited from interface com.biglybt.core.disk.DiskManagerRequest
getErrorIsFatal, requestEnds, requestStarts, setErrorIsFatal
Methods inherited from interface com.biglybt.pif.peers.PeerReadRequest
cancel, isCancelled, isExpired, resetTimeMono
-
Method Details
-
getPieceNumber
int getPieceNumber()- Specified by:
getPieceNumber
in interfacePeerReadRequest
-
getOffset
int getOffset()- Specified by:
getOffset
in interfacePeerReadRequest
-
getLength
int getLength()- Specified by:
getLength
in interfacePeerReadRequest
-
getTimeCreatedMono
long getTimeCreatedMono() -
setTimeSent
void setTimeSent(long time) -
getTimeSent
long getTimeSent() -
setFlush
void setFlush(boolean flush) If flush is set then data held in memory will be flushed to disk during the read operation- Parameters:
flush
-
-
getFlush
boolean getFlush() -
setUseCache
void setUseCache(boolean cache) -
getUseCache
boolean getUseCache() -
setLatencyTest
void setLatencyTest() -
isLatencyTest
boolean isLatencyTest() -
equals
We override the equals method 2 requests are equals if all their bt fields (piece number, offset, length) are equal -
hashCode
int hashCode()
-