com.aelitis.azureus.core.diskmanager.cache.impl
Class CacheFileWithoutCache
java.lang.Object
com.aelitis.azureus.core.diskmanager.cache.impl.CacheFileWithoutCache
- All Implemented Interfaces:
- CacheFile
public class CacheFileWithoutCache
- extends Object
- implements CacheFile
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
manager
protected final CacheFileManagerImpl manager
file
protected final FMFile file
torrent_file
protected final TOTorrentFile torrent_file
CacheFileWithoutCache
protected CacheFileWithoutCache(CacheFileManagerImpl _manager,
FMFile _file,
TOTorrentFile _torrent_file)
getTorrentFile
public TOTorrentFile getTorrentFile()
- Specified by:
getTorrentFile
in interface CacheFile
exists
public boolean exists()
- Specified by:
exists
in interface CacheFile
moveFile
public void moveFile(File new_file)
throws CacheFileManagerException
- Specified by:
moveFile
in interface CacheFile
- Throws:
CacheFileManagerException
renameFile
public void renameFile(String new_file)
throws CacheFileManagerException
- Specified by:
renameFile
in interface CacheFile
- Throws:
CacheFileManagerException
setAccessMode
public void setAccessMode(int mode)
throws CacheFileManagerException
- Specified by:
setAccessMode
in interface CacheFile
- Throws:
CacheFileManagerException
getAccessMode
public int getAccessMode()
- Specified by:
getAccessMode
in interface CacheFile
setStorageType
public void setStorageType(int type)
throws CacheFileManagerException
- Specified by:
setStorageType
in interface CacheFile
- Throws:
CacheFileManagerException
getStorageType
public int getStorageType()
- Specified by:
getStorageType
in interface CacheFile
getLength
public long getLength()
throws CacheFileManagerException
- Specified by:
getLength
in interface CacheFile
- Throws:
CacheFileManagerException
compareLength
public long compareLength(long compare_to)
throws CacheFileManagerException
- Specified by:
compareLength
in interface CacheFile
- Throws:
CacheFileManagerException
setLength
public void setLength(long length)
throws CacheFileManagerException
- Specified by:
setLength
in interface CacheFile
- Throws:
CacheFileManagerException
setPieceComplete
public void setPieceComplete(int piece_number,
DirectByteBuffer piece_data)
throws CacheFileManagerException
- Specified by:
setPieceComplete
in interface CacheFile
- Throws:
CacheFileManagerException
read
public void read(DirectByteBuffer[] buffers,
long position,
short policy)
throws CacheFileManagerException
- Specified by:
read
in interface CacheFile
- Throws:
CacheFileManagerException
read
public void read(DirectByteBuffer buffer,
long position,
short policy)
throws CacheFileManagerException
- Specified by:
read
in interface CacheFile
- Throws:
CacheFileManagerException
write
public void write(DirectByteBuffer buffer,
long position)
throws CacheFileManagerException
- Specified by:
write
in interface CacheFile
- Throws:
CacheFileManagerException
write
public void write(DirectByteBuffer[] buffers,
long position)
throws CacheFileManagerException
- Specified by:
write
in interface CacheFile
- Throws:
CacheFileManagerException
writeAndHandoverBuffer
public void writeAndHandoverBuffer(DirectByteBuffer buffer,
long position)
throws CacheFileManagerException
- Description copied from interface:
CacheFile
- writes the block to the cache and gives control of the buffer to the cache.
- Specified by:
writeAndHandoverBuffer
in interface CacheFile
- Throws:
CacheFileManagerException
- write failed and buffer *not* taken - i.e. caller must de-allocate
writeAndHandoverBuffers
public void writeAndHandoverBuffers(DirectByteBuffer[] buffers,
long position)
throws CacheFileManagerException
- Specified by:
writeAndHandoverBuffers
in interface CacheFile
- Throws:
CacheFileManagerException
flushCache
public void flushCache()
throws CacheFileManagerException
- Description copied from interface:
CacheFile
- flushes the cache to disk but retains entries
- Specified by:
flushCache
in interface CacheFile
- Throws:
CacheFileManagerException
clearCache
public void clearCache()
throws CacheFileManagerException
- Description copied from interface:
CacheFile
- flushes the cache and discards entries
- Specified by:
clearCache
in interface CacheFile
- Throws:
CacheFileManagerException
close
public void close()
throws CacheFileManagerException
- Specified by:
close
in interface CacheFile
- Throws:
CacheFileManagerException
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface CacheFile
getSessionBytesRead
public long getSessionBytesRead()
- Specified by:
getSessionBytesRead
in interface CacheFile
getSessionBytesWritten
public long getSessionBytesWritten()
- Specified by:
getSessionBytesWritten
in interface CacheFile
delete
public void delete()
throws CacheFileManagerException
- Specified by:
delete
in interface CacheFile
- Throws:
CacheFileManagerException