FileDocCategorySizeDatePackage
CacheFile.javaAPI DocAzureus 3.0.3.43673Fri Mar 23 14:10:36 GMT 2007com.aelitis.azureus.core.diskmanager.cache

CacheFile

public interface CacheFile
author
parg

Fields Summary
public static final int
CT_LINEAR
public static final int
CT_COMPACT
public static final int
CF_READ
public static final int
CF_WRITE
public static final short
CP_NONE
public static final short
CP_READ_CACHE
public static final short
CP_FLUSH
Constructors Summary
Methods Summary
public voidclearCache()
flushes the cache and discards entries

throws
CacheFileManagerException

public voidclose()

public longcompareLength(long compare_to)

public voiddelete()

public voidensureOpen(java.lang.String reason)

public booleanexists()

public voidflushCache()
flushes the cache to disk but retains entries

throws
CacheFileManagerException

public intgetAccessMode()

public longgetLength()

public intgetStorageType()

public org.gudy.azureus2.core3.torrent.TOTorrentFilegetTorrentFile()

public booleanisOpen()

public voidmoveFile(java.io.File new_file)

public voidread(org.gudy.azureus2.core3.util.DirectByteBuffer buffer, long offset, short policy)

public voidread(org.gudy.azureus2.core3.util.DirectByteBuffer[] buffers, long offset, short policy)

public voidsetAccessMode(int mode)

public voidsetLength(long length)

public voidsetStorageType(int type)

public voidwrite(org.gudy.azureus2.core3.util.DirectByteBuffer buffer, long position)

public voidwrite(org.gudy.azureus2.core3.util.DirectByteBuffer[] buffers, long position)

public voidwriteAndHandoverBuffer(org.gudy.azureus2.core3.util.DirectByteBuffer buffer, long position)
writes the block to the cache and gives control of the buffer to the cache.

param
buffer
param
position
throws
CacheFileManagerException write failed and buffer *not* taken - i.e. caller must de-allocate

public voidwriteAndHandoverBuffers(org.gudy.azureus2.core3.util.DirectByteBuffer[] buffers, long position)