|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.core3.disk.impl.access.impl.DiskManagerRequestImpl org.gudy.azureus2.core3.disk.impl.access.impl.DiskManagerReadRequestImpl
public class 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 org.gudy.azureus2.plugins.peers.PeerReadRequest |
---|
NORMAL_REQUEST_SIZE |
Constructor Summary | |
---|---|
DiskManagerReadRequestImpl(int _pieceNumber,
int _offset,
int _length)
Parameters correspond to bittorrent parameters |
Method Summary | |
---|---|
void |
cancel()
|
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 |
boolean |
getFlush()
|
int |
getLength()
|
protected java.lang.String |
getName()
|
int |
getOffset()
|
int |
getPieceNumber()
|
long |
getTimeCreated(long now)
|
long |
getTimeSent()
|
boolean |
getUseCache()
|
int |
hashCode()
|
boolean |
isCancelled()
|
boolean |
isExpired()
Method to determine if a Request has expired |
boolean |
isLatencyTest()
|
void |
resetTime(long now)
Allow some more time to the request. |
void |
setFlush(boolean _flush)
If flush is set then data held in memory will be flushed to disk during the read operation |
void |
setLatencyTest()
|
void |
setTimeSent(long time)
|
void |
setUseCache(boolean cache)
|
Methods inherited from class org.gudy.azureus2.core3.disk.impl.access.impl.DiskManagerRequestImpl |
---|
requestEnds, requestStarts |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.gudy.azureus2.core3.disk.DiskManagerRequest |
---|
requestEnds, requestStarts |
Constructor Detail |
---|
public DiskManagerReadRequestImpl(int _pieceNumber, int _offset, int _length)
pieceNumber
- offset
- length
- Method Detail |
---|
protected java.lang.String getName()
getName
in class DiskManagerRequestImpl
public boolean isExpired()
isExpired
in interface PeerReadRequest
public void resetTime(long now)
resetTime
in interface PeerReadRequest
public int getPieceNumber()
getPieceNumber
in interface DiskManagerReadRequest
getPieceNumber
in interface PeerReadRequest
public int getOffset()
getOffset
in interface DiskManagerReadRequest
getOffset
in interface PeerReadRequest
public int getLength()
getLength
in interface DiskManagerReadRequest
getLength
in interface PeerReadRequest
public void setFlush(boolean _flush)
DiskManagerReadRequest
setFlush
in interface DiskManagerReadRequest
public boolean getFlush()
getFlush
in interface DiskManagerReadRequest
public void setUseCache(boolean cache)
setUseCache
in interface DiskManagerReadRequest
public boolean getUseCache()
getUseCache
in interface DiskManagerReadRequest
public void cancel()
cancel
in interface PeerReadRequest
public boolean isCancelled()
isCancelled
in interface PeerReadRequest
public boolean equals(java.lang.Object o)
equals
in interface DiskManagerReadRequest
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface DiskManagerReadRequest
hashCode
in class java.lang.Object
public long getTimeCreated(long now)
getTimeCreated
in interface DiskManagerReadRequest
public void setTimeSent(long time)
setTimeSent
in interface DiskManagerReadRequest
public long getTimeSent()
getTimeSent
in interface DiskManagerReadRequest
public void setLatencyTest()
setLatencyTest
in interface DiskManagerReadRequest
public boolean isLatencyTest()
isLatencyTest
in interface DiskManagerReadRequest
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |