Class RPDiskManagerFileInfo
java.lang.Object
com.biglybt.pifimpl.remote.RPObject
com.biglybt.pifimpl.remote.disk.RPDiskManagerFileInfo
- All Implemented Interfaces:
DiskManagerFileInfo, Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionintprotected DiskManagerFileInfolongintbooleanbooleanlongintFields inherited from class RPObject
__delegate, _dispatcher, _object_id, next_key, object_registry, object_registry_reverseFields inherited from interface DiskManagerFileInfo
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_NORMAL, READ, WRITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_setDelegate(Object _delegate) static RPDiskManagerFileInfocreate(DiskManagerFileInfo _delegate) createRandomReadRequest(long file_offset, long length, boolean reverse_order, DiskManagerListener listener) Creates a random read request - these will be executed against the download sequentiallyintlongbyte[]getFile()getFile(boolean follow_link) returns liked file if it exists, direct otherwiseintintgetIndex()longlongSize when file is completegetLink()intintlongbooleanbooleanbooleanvoidsetDeleted(boolean b) Mark the file as deleted or not (deleted means the file will be truncated to take up minimum space).voidvoidsetNumericPriority(int priority) Sets the file's download priority base on a numbervoidsetPriority(boolean b) voidsetSkipped(boolean b) Methods inherited from class RPObject
_fixupLocal, _getDelegate, _getName, _getOID, _lookupLocal, _lookupLocal, _refresh, _setRemote, getDispatcher, notSupported, notSupportedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DiskManagerFileInfo
setLink
-
Field Details
-
delegate
-
access_mode
public int access_mode -
downloaded
public long downloaded -
length
public long length -
file
-
first_piece_number
public int first_piece_number -
num_pieces
public int num_pieces -
is_priority
public boolean is_priority -
is_skipped
public boolean is_skipped
-
-
Constructor Details
-
RPDiskManagerFileInfo
-
-
Method Details
-
create
-
_setDelegate
- Overrides:
_setDelegatein classRPObject
-
_setLocal
- Overrides:
_setLocalin classRPObject- Throws:
RPException
-
_process
-
setPriority
public void setPriority(boolean b) - Specified by:
setPriorityin interfaceDiskManagerFileInfo
-
setSkipped
public void setSkipped(boolean b) - Specified by:
setSkippedin interfaceDiskManagerFileInfo
-
isSkipping
- Specified by:
isSkippingin interfaceDiskManagerFileInfo
-
getNumericPriority
public int getNumericPriority()- Specified by:
getNumericPriorityin interfaceDiskManagerFileInfo- Returns:
-
setNumericPriority
public void setNumericPriority(int priority) Description copied from interface:DiskManagerFileInfoSets the file's download priority base on a number- Specified by:
setNumericPriorityin interfaceDiskManagerFileInfo- Parameters:
priority- Any number orDiskManagerFileInfo.PRIORITY_LOW,DiskManagerFileInfo.PRIORITY_NORMAL,DiskManagerFileInfo.PRIORITY_HIGH
-
setDeleted
public void setDeleted(boolean b) Description copied from interface:DiskManagerFileInfoMark the file as deleted or not (deleted means the file will be truncated to take up minimum space). This is generally 0 invalid input: '<'= X invalid input: '<' 2*piece_length as pieces can span file boundaries.- Specified by:
setDeletedin interfaceDiskManagerFileInfo- Parameters:
b-
-
isDeleted
public boolean isDeleted()- Specified by:
isDeletedin interfaceDiskManagerFileInfo
-
getAccessMode
public int getAccessMode()- Specified by:
getAccessModein interfaceDiskManagerFileInfo
-
getDownloaded
public long getDownloaded()- Specified by:
getDownloadedin interfaceDiskManagerFileInfo
-
getLastModified
public long getLastModified()- Specified by:
getLastModifiedin interfaceDiskManagerFileInfo
-
getLength
public long getLength()Description copied from interface:DiskManagerFileInfoSize when file is complete- Specified by:
getLengthin interfaceDiskManagerFileInfo
-
getFile
- Specified by:
getFilein interfaceDiskManagerFileInfo
-
getFile
Description copied from interface:DiskManagerFileInforeturns liked file if it exists, direct otherwise- Specified by:
getFilein interfaceDiskManagerFileInfo- Parameters:
follow_link-- Returns:
-
getFirstPieceNumber
public int getFirstPieceNumber()- Specified by:
getFirstPieceNumberin interfaceDiskManagerFileInfo
-
getPieceSize
public long getPieceSize()- Specified by:
getPieceSizein interfaceDiskManagerFileInfo
-
getNumPieces
public int getNumPieces()- Specified by:
getNumPiecesin interfaceDiskManagerFileInfo
-
isPriority
public boolean isPriority()- Specified by:
isPriorityin interfaceDiskManagerFileInfo
-
isSkipped
public boolean isSkipped()- Specified by:
isSkippedin interfaceDiskManagerFileInfo
-
getIndex
public int getIndex()- Specified by:
getIndexin interfaceDiskManagerFileInfo
-
setLink
- Specified by:
setLinkin interfaceDiskManagerFileInfo
-
getLink
- Specified by:
getLinkin interfaceDiskManagerFileInfo
-
getDownloadHash
public byte[] getDownloadHash()- Specified by:
getDownloadHashin interfaceDiskManagerFileInfo
-
getDownload
- Specified by:
getDownloadin interfaceDiskManagerFileInfo- Throws:
DownloadException
-
createChannel
- Specified by:
createChannelin interfaceDiskManagerFileInfo
-
createRandomReadRequest
public DiskManagerRandomReadRequest createRandomReadRequest(long file_offset, long length, boolean reverse_order, DiskManagerListener listener) throws DownloadException Description copied from interface:DiskManagerFileInfoCreates a random read request - these will be executed against the download sequentially- Specified by:
createRandomReadRequestin interfaceDiskManagerFileInfo- Parameters:
file_offset-length-reverse_order- - deliver blocks to the listener in reverse orderlistener-- Returns:
- Throws:
DownloadException
-