com.aelitis.azureus.core.diskmanager.access.impl
Class DiskAccessRequestImpl

java.lang.Object
  extended by com.aelitis.azureus.core.diskmanager.access.impl.DiskAccessRequestImpl
All Implemented Interfaces:
DiskAccessRequest

public class DiskAccessRequestImpl
extends Object
implements DiskAccessRequest


Field Summary
protected static short OP_READ
           
protected static short OP_WRITE
           
protected static short OP_WRITE_AND_FREE
           
 
Constructor Summary
protected DiskAccessRequestImpl(CacheFile _file, long _offset, DirectByteBuffer _buffer, DiskAccessRequestListener _listener, short _op, short _cache_policy)
           
 
Method Summary
protected  boolean canBeAggregatedWith(DiskAccessRequestImpl other)
           
 void cancel()
           
 DirectByteBuffer getBuffer()
           
 short getCachePolicy()
           
 CacheFile getFile()
           
protected  DiskAccessRequestListener getListener()
           
 long getOffset()
           
protected  int getOperation()
           
 int getPriority()
           
 int getSize()
           
 boolean isCancelled()
           
protected static void runAggregated(DiskAccessRequestImpl base_request, DiskAccessRequestImpl[] requests)
           
protected  void runRequest()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OP_READ

protected static final short OP_READ
See Also:
Constant Field Values

OP_WRITE

protected static final short OP_WRITE
See Also:
Constant Field Values

OP_WRITE_AND_FREE

protected static final short OP_WRITE_AND_FREE
See Also:
Constant Field Values
Constructor Detail

DiskAccessRequestImpl

protected DiskAccessRequestImpl(CacheFile _file,
                                long _offset,
                                DirectByteBuffer _buffer,
                                DiskAccessRequestListener _listener,
                                short _op,
                                short _cache_policy)
Method Detail

getSize

public int getSize()
Specified by:
getSize in interface DiskAccessRequest

runRequest

protected void runRequest()

canBeAggregatedWith

protected boolean canBeAggregatedWith(DiskAccessRequestImpl other)

runAggregated

protected static void runAggregated(DiskAccessRequestImpl base_request,
                                    DiskAccessRequestImpl[] requests)

getFile

public CacheFile getFile()
Specified by:
getFile in interface DiskAccessRequest

getOffset

public long getOffset()
Specified by:
getOffset in interface DiskAccessRequest

getBuffer

public DirectByteBuffer getBuffer()
Specified by:
getBuffer in interface DiskAccessRequest

cancel

public void cancel()
Specified by:
cancel in interface DiskAccessRequest

isCancelled

public boolean isCancelled()

getCachePolicy

public short getCachePolicy()

getOperation

protected int getOperation()

getPriority

public int getPriority()
Specified by:
getPriority in interface DiskAccessRequest

getListener

protected DiskAccessRequestListener getListener()