Package com.biglybt.core.disk
Interface DiskManagerReadRequest
-
- All Superinterfaces:
DiskManagerRequest
,PeerReadRequest
- All Known Implementing Classes:
DiskManagerReadRequestImpl
public interface DiskManagerReadRequest extends PeerReadRequest, DiskManagerRequest
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
We override the equals method 2 requests are equals if all their bt fields (piece number, offset, length) are equalboolean
getFlush()
int
getLength()
int
getOffset()
int
getPieceNumber()
long
getTimeCreated(long now)
long
getTimeSent()
boolean
getUseCache()
int
hashCode()
boolean
isLatencyTest()
void
setFlush(boolean flush)
If flush is set then data held in memory will be flushed to disk during the read operationvoid
setLatencyTest()
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, resetTime
-
-
-
-
Method Detail
-
getPieceNumber
int getPieceNumber()
- Specified by:
getPieceNumber
in interfacePeerReadRequest
-
getOffset
int getOffset()
- Specified by:
getOffset
in interfacePeerReadRequest
-
getLength
int getLength()
- Specified by:
getLength
in interfacePeerReadRequest
-
getTimeCreated
long getTimeCreated(long now)
-
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
boolean equals(java.lang.Object o)
We override the equals method 2 requests are equals if all their bt fields (piece number, offset, length) are equal- Overrides:
equals
in classjava.lang.Object
-
hashCode
int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-