org.gudy.azureus2.core3.disk
Interface DiskManagerFileInfo

All Known Subinterfaces:
DiskManagerFileInfoHelper
All Known Implementing Classes:
DiskManagerFileInfoImpl, DownloadManagerController.fileInfoFacade

public interface DiskManagerFileInfo

Author:
Olivier

Field Summary
static int READ
           
static int ST_COMPACT
           
static int ST_LINEAR
           
static int ST_REORDER
           
static int ST_REORDER_COMPACT
           
static int WRITE
           
 
Method Summary
 void addListener(DiskManagerFileInfoListener listener)
           
 void close()
           
 void flushCache()
           
 int getAccessMode()
           
 DiskManager getDiskManager()
           
 long getDownloaded()
           
 DownloadManager getDownloadManager()
           
 long getETA()
           
 java.lang.String getExtension()
           
 java.io.File getFile(boolean follow_link)
           
 int getFirstPieceNumber()
           
 int getIndex()
           
 int getLastPieceNumber()
           
 long getLength()
           
 java.io.File getLink()
           
 int getNbPieces()
           
 int getPriority()
           
 int getReadBytesPerSecond()
           
 int getStorageType()
           
 TOTorrentFile getTorrentFile()
           
 int getWriteBytesPerSecond()
           
 boolean isSkipped()
           
 DirectByteBuffer read(long offset, int length)
           
 void removeListener(DiskManagerFileInfoListener listener)
           
 boolean setLink(java.io.File link_destination)
          Relink the file to the destination given - this method deals with if the file is part of a simple torrent or not (so it may set the download name to keep it in sync).
 boolean setLinkAtomic(java.io.File link_destination)
           
 void setPriority(int p)
           
 void setSkipped(boolean b)
           
 boolean setStorageType(int type)
          Download must be stopped before calling this!
 

Field Detail

READ

static final int READ
See Also:
Constant Field Values

WRITE

static final int WRITE
See Also:
Constant Field Values

ST_LINEAR

static final int ST_LINEAR
See Also:
Constant Field Values

ST_COMPACT

static final int ST_COMPACT
See Also:
Constant Field Values

ST_REORDER

static final int ST_REORDER
See Also:
Constant Field Values

ST_REORDER_COMPACT

static final int ST_REORDER_COMPACT
See Also:
Constant Field Values
Method Detail

setPriority

void setPriority(int p)

setSkipped

void setSkipped(boolean b)

setLink

boolean setLink(java.io.File link_destination)
Relink the file to the destination given - this method deals with if the file is part of a simple torrent or not (so it may set the download name to keep it in sync). If you just want a simple relink, use setLinkAtomic.

Parameters:
link_destination -
Returns:

setLinkAtomic

boolean setLinkAtomic(java.io.File link_destination)

getLink

java.io.File getLink()

setStorageType

boolean setStorageType(int type)
Download must be stopped before calling this!

Parameters:
type - one of ST_LINEAR or ST_COMPACT

getStorageType

int getStorageType()

getAccessMode

int getAccessMode()

getDownloaded

long getDownloaded()

getExtension

java.lang.String getExtension()

getFirstPieceNumber

int getFirstPieceNumber()

getLastPieceNumber

int getLastPieceNumber()

getLength

long getLength()

getNbPieces

int getNbPieces()

getPriority

int getPriority()

isSkipped

boolean isSkipped()

getIndex

int getIndex()

getDownloadManager

DownloadManager getDownloadManager()

getDiskManager

DiskManager getDiskManager()

getFile

java.io.File getFile(boolean follow_link)

getTorrentFile

TOTorrentFile getTorrentFile()

read

DirectByteBuffer read(long offset,
                      int length)
                      throws java.io.IOException
Throws:
java.io.IOException

flushCache

void flushCache()
                throws java.lang.Exception
Throws:
java.lang.Exception

getReadBytesPerSecond

int getReadBytesPerSecond()

getWriteBytesPerSecond

int getWriteBytesPerSecond()

getETA

long getETA()

close

void close()

addListener

void addListener(DiskManagerFileInfoListener listener)

removeListener

void removeListener(DiskManagerFileInfoListener listener)