Class DiskManagerImpl
java.lang.Object
com.biglybt.core.logging.LogRelation
com.biglybt.core.disk.impl.DiskManagerImpl
- All Implemented Interfaces:
DiskManager, DiskManagerHelper, DiskManagerUtil.MoveTaskAapter
public class DiskManagerImpl
extends LogRelation
implements DiskManagerHelper, DiskManagerUtil.MoveTaskAapter
The disk Wrapper.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface DiskManager
DiskManager.DownloadEndedProgress -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate longprivate static final DiskManagerAllocationSchedulerprivate Stringprivate booleanprivate final BitFlagsprivate DMCheckerprivate booleanprivate static final DiskAccessControllerprivate static final intprotected final DownloadManager(package private) static booleanprivate Stringprivate intprivate final Objectprivate DiskManagerFileInfoImpl[]private DiskManagerFileInfoSetlongprivate intprivate static final intprivate static final intprivate static final intprivate static final intprivate final ListenerManager<DiskManagerListener> protected static final ListenerManager<DiskManagerListener> private static final LogIDs(package private) static booleanprivate booleanprivate long[]private intprivate Fileprivate intprivate intprivate DMPieceMapprivate longprivate DMPieceMapperprivate intprivate DiskManagerPieceImpl[]private final AtomicLongprivate DMReaderprivate static final DiskManagerRecheckSchedulerprivate longprivate long(package private) static boolean(package private) static intprivate RDResumeHandler(package private) static boolean(package private) static booleanprivate longprivate booleanprivate long(package private) static booleanprivate static final ThreadPool<AERunnable> (package private) final AEMonitorprivate boolean(package private) final AESemaphoreprivate booleanprivate intprivate boolean(package private) static booleanprivate booleanprivate final TOTorrentprivate longprivate booleanprivate DMWriterFields inherited from interface DiskManager
ALLOCATING, BLOCK_SIZE, BLOCK_SIZE_KB, CHECKING, ET_FILE_MISSING, ET_INSUFFICIENT_SPACE, ET_NONE, ET_OTHER, ET_READ_ERROR, ET_STOP_DURING_INIT, ET_WRITE_ERROR, FAULTY, INITIALIZING, READY, SNAPSHOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate booleanallocateFile(DiskManagerAllocationScheduler.AllocationInstance allocation_instance, DiskManagerFileInfoImpl fileInfo, File data_file, long existing_length, long target_length, boolean[] stop_after_start, long alloc_strategy) private int[]allocateFiles(Map<DiskManagerFileInfo, Long> file_sizes, boolean[] stop_after_start) private booleancanFailureBeIgnored(Throwable cause) booleancheckBlockConsistencyForHint(String originator, int pieceNumber, int offset, int length) booleancheckBlockConsistencyForRead(String originator, boolean peer_request, int pieceNumber, int offset, int length) method for checking that the block details are sensiblebooleancheckBlockConsistencyForWrite(String originator, int pieceNumber, int offset, DirectByteBuffer data) method for checking that the block details are sensiblevoidcheckFreePieceList(boolean force_discard) private static intcountDataFiles(DownloadManager dm, TOTorrent torrent, String torrent_save_dir, String torrent_save_file) private static intcountFiles(File f, int stopAfterCount) createCheckRequest(int pieceNumber, Object user_data) Create a request to check a particular pieceprivate DiskManagerFileInfoImplcreateFileInfo(DownloadManagerState state, DMPieceMapperFile pm_info, int file_index, File root_dir, StringInterner.FileKey relative_file, int storage_type) createReadRequest(int pieceNumber, int offset, int length) createWriteRequest(int pieceNumber, int offset, DirectByteBuffer data, Object user_data) private static voiddeleteDataFileContents(DownloadManager dm, TOTorrent torrent, String torrent_save_dir, String torrent_save_file, boolean force_no_recycle) static voiddeleteDataFiles(DownloadManager dm, TOTorrent torrent, String torrent_save_dir, String torrent_save_file, boolean force_no_recycle) Deletes all data files associated with torrent.downloadEnded(boolean start_of_day) voidvoidenqueueCheckRequest(DiskManagerCheckRequest request, DiskManagerCheckRequestListener listener) enqueue an asynchronous single piece checkvoidenqueueCompleteRecheckRequest(DiskManagerCheckRequest request, DiskManagerCheckRequestListener listener) recheck the entire torrent asynchronously, reporting each piece to the listenervoidenqueueReadRequest(DiskManagerReadRequest request, DiskManagerReadRequestListener listener) Enqueue an async disk read request.voidenqueueWriteRequest(DiskManagerWriteRequest request, DiskManagerWriteRequestListener listener) enqueue an async write requestprivate voidfileAllocFailed(File file, long length, boolean is_new, Throwable e) booleanprotected booleanfilesExist(File root_dir, boolean exact) private voidvoidgenerateEvidence(IndentWriter writer) intintreturns -1 if no recheck in progress, percentage complete in 1000 notation otherwisestatic DiskAccessControllerintgetFiles()intlong[]long[]When a download's data is moving (for completion or removal events) this gives the [progress in 1000 notation,total_size] null if nothing's going onintintintGet the percentage done during checking, allocation or initializingintgetPiece(int PieceNumber) byte[]getPieceHash(int piece_number) intintgetPieceLength(int piece_number) getPieceList(int piece_number) DON'T CACHE the DMPieceMap - as it is designed to be discarded when not in uselongObject[]Query this class for a reference to another class that it may holdlong[]booleanA short description of what your class holds that can be printed by the loggerlongGet remaining bytes to completion *including* DND fileslonglongintgetState()getStorageType(int fileIndex) Returns the storage type for file atfileIndex.static StringgetStorageType(DownloadManager download_manager, int fileIndex) Returns the storage type for aDownloadManager's file atfileIndex.String[]Returns the storage type for all files.static String[]getStorageTypes(DownloadManager download_manager) Returns the storage type for each file inDownloadManager.longlong[]booleanbooleanhasOutstandingCheckRequestForPiece(int piece_number) booleanhasOutstandingReadRequestForPiece(int piece_number) booleanhasOutstandingWriteRequestForPiece(int piece_number) booleanisDone(int pieceNumber) private booleanisFileDestinationIsItself(SaveLocationChange loc_change) booleanisInteresting(int pieceNumber) booleanbooleanprivate voidlogMoveFileError(File destination_path, String message) voidmoveDataFiles(File new_parent_dir, String new_name) private booleanmoveDataFiles0(SaveLocationChange loc_change, boolean change_to_read_only) private voidmoveDownloadFilesWhenEndedOrRemoved(boolean removing, boolean torrent_file_exists, DiskManagerImpl.DownloadEndedProgressImpl progress, boolean start_of_day) private voidmoveDownloadFilesWhenEndedOrRemoved0(SaveLocationChange loc_change, DiskManagerImpl.DownloadEndedProgressImpl progress) protected voidmoveFiles(SaveLocationChange loc_change, boolean change_to_read_only) private voidmoveTorrentFile(SaveLocationChange loc_change) voidvoidreadBlock(int pieceNumber, int offset, int length) voidvoidsaveResumeData(boolean interim_save) voidsaveState(boolean interim) Save the individual file priorities map to DownloadManager.getData( "file_priorities" ).protected voidsaveStateSupport(boolean persist, boolean interim) private voidsetErrorMessage(long file_length, Throwable e, String str) private voidsetErrorMessage(String str) private voidsetErrorMessage(Throwable e, String str) private voidprivate voidsetErrorState(int type) private voidsetErrorState(int type, String msg) private voidsetErrorState(int type, String msg, Throwable cause) private voidsetErrorState(String msg) voidStops the disk manager and informs the download manager that things have gone wrong.voidsetFailedAndRecheck(DiskManagerFileInfo file, String reason) voidsetMoveState(int state) voidsetPieceCheckingEnabled(boolean enabled) voidsetPieceDone(DiskManagerPieceImpl dmPiece, boolean done) Called when status has CHANGED and should only be called by DiskManagerPieceImplprivate voidsetState(int _state) voidvoidstart()Start checking/allocating(package private) voidbooleanstop(boolean closing) Stop can go async if the download is in a 'starting' state - if so this method returns truevoidprotected static voidstoreFileDownloaded(DownloadManager download_manager, DiskManagerFileInfo[] files, boolean persist, boolean interim) protected voidprotected static voidstoreFilePriorities(DownloadManager download_manager, DiskManagerFileInfo[] files) Methods inherited from class LogRelation
propogatedRelationText, queryForClass
-
Field Details
-
DM_FREE_PIECELIST_TIMEOUT
private static final int DM_FREE_PIECELIST_TIMEOUT- See Also:
-
LOGID
-
disk_access_controller
-
reorder_storage_mode
static boolean reorder_storage_mode -
reorder_storage_mode_min_mb
static int reorder_storage_mode_min_mb -
missing_file_dl_restart_enabled
static volatile boolean missing_file_dl_restart_enabled -
skip_incomp_dl_file_checks
static boolean skip_incomp_dl_file_checks -
skip_comp_dl_file_checks
static boolean skip_comp_dl_file_checks -
switch_to_upload_only_enable
static boolean switch_to_upload_only_enable -
enable_sparse_files
static boolean enable_sparse_files -
sparse_files_dont_preallocate
static boolean sparse_files_dont_preallocate -
recheck_scheduler
-
allocation_scheduler
-
start_pool
-
used
private boolean used -
started
private boolean started -
started_sem
-
starting
private boolean starting -
stopping
private volatile boolean stopping -
state_set_via_method
private volatile int state_set_via_method -
errorMessage_set_via_method
-
errorType
private volatile int errorType -
pieceLength
private int pieceLength -
lastPieceLength
private int lastPieceLength -
nbPieces
private int nbPieces -
totalLength
private long totalLength -
percentDone
private int percentDone -
allocated
private long allocated -
allocate_not_required
private long allocate_not_required -
remaining
private long remaining -
allocation_task
-
remaining_excluding_dnd
private volatile long remaining_excluding_dnd -
torrent
-
reader
-
checker
-
writer
-
resume_handler
-
piece_mapper
-
pieces
-
piece_map_use_accessor
-
piece_map_use_accessor_time
private long piece_map_use_accessor_time -
files
-
fileset
-
download_manager
-
alreadyMoved
private boolean alreadyMoved -
skipped_file_set_changed
private boolean skipped_file_set_changed -
skipped_file_set_size
private long skipped_file_set_size -
skipped_but_downloaded
private long skipped_but_downloaded -
priority_change_marker
-
checking_enabled
private boolean checking_enabled -
move_in_progress
private volatile boolean move_in_progress -
move_progress
private volatile long[] move_progress -
move_subtask
-
move_state
private volatile int move_state -
LDT_STATE_CHANGED
private static final int LDT_STATE_CHANGED- See Also:
-
LDT_PRIO_CHANGED
private static final int LDT_PRIO_CHANGED- See Also:
-
LDT_PIECE_DONE_CHANGED
private static final int LDT_PIECE_DONE_CHANGED- See Also:
-
LDT_FILE_COMPLETED
private static final int LDT_FILE_COMPLETED- See Also:
-
listeners_aggregator
-
listeners
-
start_stop_mon
-
file_piece_lock
-
availability
-
switched_to_upload_only
private volatile boolean switched_to_upload_only -
garbage
public long garbage
-
-
Constructor Details
-
DiskManagerImpl
-
-
Method Details
-
getDefaultDiskAccessController
-
getDisplayName
- Specified by:
getDisplayNamein interfaceDiskManagerHelper
-
getDownload
- Specified by:
getDownloadin interfaceDiskManager- Returns:
- MAY BE NULL
-
start
public void start()Description copied from interface:DiskManagerStart checking/allocating- Specified by:
startin interfaceDiskManager
-
startSupport
void startSupport() -
stop
public boolean stop(boolean closing) Description copied from interface:DiskManagerStop can go async if the download is in a 'starting' state - if so this method returns true- Specified by:
stopin interfaceDiskManager- Parameters:
closing-- Returns:
-
isStopped
public boolean isStopped()- Specified by:
isStoppedin interfaceDiskManager
-
filesExist
public boolean filesExist()- Specified by:
filesExistin interfaceDiskManager- Returns:
- whether all files exist and sizes match
-
filesExist
-
createFileInfo
private DiskManagerFileInfoImpl createFileInfo(DownloadManagerState state, DMPieceMapperFile pm_info, int file_index, File root_dir, StringInterner.FileKey relative_file, int storage_type) throws CacheFileManagerException - Throws:
CacheFileManagerException
-
allocateFiles
-
allocateFile
private boolean allocateFile(DiskManagerAllocationScheduler.AllocationInstance allocation_instance, DiskManagerFileInfoImpl fileInfo, File data_file, long existing_length, long target_length, boolean[] stop_after_start, long alloc_strategy) throws Throwable - Throws:
Throwable
-
fileAllocFailed
-
getDiskAccessController
- Specified by:
getDiskAccessControllerin interfaceDiskManagerHelper
-
enqueueReadRequest
public void enqueueReadRequest(DiskManagerReadRequest request, DiskManagerReadRequestListener listener) Description copied from interface:DiskManagerEnqueue an async disk read request.- Specified by:
enqueueReadRequestin interfaceDiskManager- Parameters:
request-listener-
-
hasOutstandingReadRequestForPiece
public boolean hasOutstandingReadRequestForPiece(int piece_number) - Specified by:
hasOutstandingReadRequestForPiecein interfaceDiskManager
-
getNbPieces
public int getNbPieces()- Specified by:
getNbPiecesin interfaceDiskManager
-
getPercentDone
public int getPercentDone()Description copied from interface:DiskManagerGet the percentage done during checking, allocation or initializing- Specified by:
getPercentDonein interfaceDiskManager- Returns:
- percent done * 1000 (1000 = 100%)
-
getPercentAllocated
public int getPercentAllocated()- Specified by:
getPercentAllocatedin interfaceDiskManager
-
getLatency
public long[] getLatency()- Specified by:
getLatencyin interfaceDiskManager
-
getAllocationTask
- Specified by:
getAllocationTaskin interfaceDiskManager
-
getRemaining
public long getRemaining()Description copied from interface:DiskManagerGet remaining bytes to completion *including* DND files- Specified by:
getRemainingin interfaceDiskManager
-
fixupSkippedCalculation
private void fixupSkippedCalculation() -
getRemainingExcludingDND
public long getRemainingExcludingDND()- Specified by:
getRemainingExcludingDNDin interfaceDiskManager
-
getSizeExcludingDND
public long getSizeExcludingDND()- Specified by:
getSizeExcludingDNDin interfaceDiskManager
-
getPercentDoneExcludingDND
public int getPercentDoneExcludingDND()- Specified by:
getPercentDoneExcludingDNDin interfaceDiskManager
-
setPieceDone
Called when status has CHANGED and should only be called by DiskManagerPieceImpl- Specified by:
setPieceDonein interfaceDiskManagerHelper
-
getAvailability
- Specified by:
getAvailabilityin interfaceDiskManager
-
getPieces
- Specified by:
getPiecesin interfaceDiskManager
-
getPiece
- Specified by:
getPiecein interfaceDiskManager
-
getPieceLength
public int getPieceLength()- Specified by:
getPieceLengthin interfaceDiskManager
-
getPieceLength
public int getPieceLength(int piece_number) - Specified by:
getPieceLengthin interfaceDiskManager
-
getTotalLength
public long getTotalLength()- Specified by:
getTotalLengthin interfaceDiskManager
-
getLastPieceLength
public int getLastPieceLength() -
getState
public int getState()- Specified by:
getStatein interfaceDiskManager
-
setErrorMessage
-
setErrorMessage
-
setErrorMessage
-
setErrorState
private void setErrorState() -
setErrorState
-
setErrorState
-
setErrorState
-
setErrorState
private void setErrorState(int type) -
setState
private void setState(int _state) -
getFiles
- Specified by:
getFilesin interfaceDiskManager
-
getFileSet
- Specified by:
getFileSetin interfaceDiskManager
-
getErrorMessage
- Specified by:
getErrorMessagein interfaceDiskManager
-
getErrorType
public int getErrorType()- Specified by:
getErrorTypein interfaceDiskManager
-
canFailureBeIgnored
-
isUploadOnly
public boolean isUploadOnly()- Specified by:
isUploadOnlyin interfaceDiskManagerHelper
-
rateLimitChanged
public void rateLimitChanged()- Specified by:
rateLimitChangedin interfaceDiskManager
-
setFailed
Description copied from interface:DiskManagerHelperStops the disk manager and informs the download manager that things have gone wrong.- Specified by:
setFailedin interfaceDiskManagerHelper- Parameters:
reason-
-
setFailedAndRecheck
- Specified by:
setFailedAndRecheckin interfaceDiskManagerHelper
-
getCacheMode
public int getCacheMode()- Specified by:
getCacheModein interfaceDiskManager
-
getReadStats
public long[] getReadStats()- Specified by:
getReadStatsin interfaceDiskManager
-
getWriteStats
public long[] getWriteStats()- Specified by:
getWriteStatsin interfaceDiskManager
-
getPieceMap
Description copied from interface:DiskManagerDON'T CACHE the DMPieceMap - as it is designed to be discarded when not in use- Specified by:
getPieceMapin interfaceDiskManager- Returns:
-
getPieceList
- Specified by:
getPieceListin interfaceDiskManager- Specified by:
getPieceListin interfaceDiskManagerHelper
-
checkFreePieceList
public void checkFreePieceList(boolean force_discard) -
getPieceHash
- Specified by:
getPieceHashin interfaceDiskManagerHelper- Throws:
TOTorrentException
-
createReadRequest
- Specified by:
createReadRequestin interfaceDiskManager
-
createCheckRequest
Description copied from interface:DiskManagerCreate a request to check a particular piece- Specified by:
createCheckRequestin interfaceDiskManager- Parameters:
pieceNumber- -1 for a complete recheck requestuser_data-- Returns:
-
hasOutstandingCheckRequestForPiece
public boolean hasOutstandingCheckRequestForPiece(int piece_number) - Specified by:
hasOutstandingCheckRequestForPiecein interfaceDiskManager
-
enqueueCompleteRecheckRequest
public void enqueueCompleteRecheckRequest(DiskManagerCheckRequest request, DiskManagerCheckRequestListener listener) Description copied from interface:DiskManagerrecheck the entire torrent asynchronously, reporting each piece to the listener- Specified by:
enqueueCompleteRecheckRequestin interfaceDiskManager- Parameters:
listener-
-
enqueueCheckRequest
public void enqueueCheckRequest(DiskManagerCheckRequest request, DiskManagerCheckRequestListener listener) Description copied from interface:DiskManagerenqueue an asynchronous single piece check- Specified by:
enqueueCheckRequestin interfaceDiskManager- Parameters:
listener-
-
getCompleteRecheckStatus
public int getCompleteRecheckStatus()Description copied from interface:DiskManagerreturns -1 if no recheck in progress, percentage complete in 1000 notation otherwise- Specified by:
getCompleteRecheckStatusin interfaceDiskManager- Returns:
-
getRecheckCancelled
public boolean getRecheckCancelled()- Specified by:
getRecheckCancelledin interfaceDiskManager
-
getMoveProgress
public long[] getMoveProgress()Description copied from interface:DiskManagerWhen a download's data is moving (for completion or removal events) this gives the [progress in 1000 notation,total_size] null if nothing's going on- Specified by:
getMoveProgressin interfaceDiskManager- Specified by:
getMoveProgressin interfaceDiskManagerUtil.MoveTaskAapter- Returns:
-
getMoveSubTask
- Specified by:
getMoveSubTaskin interfaceDiskManager- Specified by:
getMoveSubTaskin interfaceDiskManagerUtil.MoveTaskAapter
-
setMoveState
public void setMoveState(int state) - Specified by:
setMoveStatein interfaceDiskManager- Specified by:
setMoveStatein interfaceDiskManagerUtil.MoveTaskAapter
-
setPieceCheckingEnabled
public void setPieceCheckingEnabled(boolean enabled) - Specified by:
setPieceCheckingEnabledin interfaceDiskManager
-
readBlock
- Specified by:
readBlockin interfaceDiskManager
-
createWriteRequest
public DiskManagerWriteRequest createWriteRequest(int pieceNumber, int offset, DirectByteBuffer data, Object user_data) - Specified by:
createWriteRequestin interfaceDiskManager
-
enqueueWriteRequest
public void enqueueWriteRequest(DiskManagerWriteRequest request, DiskManagerWriteRequestListener listener) Description copied from interface:DiskManagerenqueue an async write request- Specified by:
enqueueWriteRequestin interfaceDiskManager- Parameters:
listener-
-
hasOutstandingWriteRequestForPiece
public boolean hasOutstandingWriteRequestForPiece(int piece_number) - Specified by:
hasOutstandingWriteRequestForPiecein interfaceDiskManager
-
checkBlockConsistencyForWrite
public boolean checkBlockConsistencyForWrite(String originator, int pieceNumber, int offset, DirectByteBuffer data) Description copied from interface:DiskManagermethod for checking that the block details are sensible- Specified by:
checkBlockConsistencyForWritein interfaceDiskManager- Parameters:
pieceNumber-offset-data-- Returns:
-
checkBlockConsistencyForRead
public boolean checkBlockConsistencyForRead(String originator, boolean peer_request, int pieceNumber, int offset, int length) Description copied from interface:DiskManagermethod for checking that the block details are sensible- Specified by:
checkBlockConsistencyForReadin interfaceDiskManager- Parameters:
pieceNumber-offset-length-- Returns:
-
checkBlockConsistencyForHint
public boolean checkBlockConsistencyForHint(String originator, int pieceNumber, int offset, int length) - Specified by:
checkBlockConsistencyForHintin interfaceDiskManager
-
saveResumeData
- Specified by:
saveResumeDatain interfaceDiskManager- Throws:
Exception
-
downloadEnded
- Specified by:
downloadEndedin interfaceDiskManager
-
downloadRemoved
public void downloadRemoved()- Specified by:
downloadRemovedin interfaceDiskManager
-
moveDownloadFilesWhenEndedOrRemoved
private void moveDownloadFilesWhenEndedOrRemoved(boolean removing, boolean torrent_file_exists, DiskManagerImpl.DownloadEndedProgressImpl progress, boolean start_of_day) -
moveDownloadFilesWhenEndedOrRemoved0
private void moveDownloadFilesWhenEndedOrRemoved0(SaveLocationChange loc_change, DiskManagerImpl.DownloadEndedProgressImpl progress) -
moveDataFiles
- Specified by:
moveDataFilesin interfaceDiskManager
-
moveFiles
-
logMoveFileError
-
isFileDestinationIsItself
-
moveDataFiles0
private boolean moveDataFiles0(SaveLocationChange loc_change, boolean change_to_read_only) throws Exception - Throws:
Exception
-
moveTorrentFile
-
getTorrent
- Specified by:
getTorrentin interfaceDiskManager- Specified by:
getTorrentin interfaceDiskManagerHelper
-
addListener
- Specified by:
addListenerin interfaceDiskManager
-
removeListener
- Specified by:
removeListenerin interfaceDiskManager
-
hasListener
- Specified by:
hasListenerin interfaceDiskManager
-
deleteDataFiles
public static void deleteDataFiles(DownloadManager dm, TOTorrent torrent, String torrent_save_dir, String torrent_save_file, boolean force_no_recycle) Deletes all data files associated with torrent. Currently, deletes all files, then tries to delete the path recursively if the paths are empty. An unexpected result may be that a empty directory that the user created will be removed. TODO: only remove empty directories that are created for the torrent -
countFiles
-
countDataFiles
private static int countDataFiles(DownloadManager dm, TOTorrent torrent, String torrent_save_dir, String torrent_save_file) -
deleteDataFileContents
private static void deleteDataFileContents(DownloadManager dm, TOTorrent torrent, String torrent_save_dir, String torrent_save_file, boolean force_no_recycle) throws TOTorrentException, UnsupportedEncodingException, LocaleUtilEncodingException -
skippedFileSetChanged
- Specified by:
skippedFileSetChangedin interfaceDiskManagerHelper
-
priorityChanged
- Specified by:
priorityChangedin interfaceDiskManagerHelper
-
storageTypeChanged
- Specified by:
storageTypeChangedin interfaceDiskManagerHelper
-
storeFilePriorities
protected void storeFilePriorities() -
storeFilePriorities
protected static void storeFilePriorities(DownloadManager download_manager, DiskManagerFileInfo[] files) -
storeFileDownloaded
protected static void storeFileDownloaded(DownloadManager download_manager, DiskManagerFileInfo[] files, boolean persist, boolean interim) -
saveState
public void saveState(boolean interim) Description copied from interface:DiskManagerSave the individual file priorities map to DownloadManager.getData( "file_priorities" ).- Specified by:
saveStatein interfaceDiskManager
-
saveStateSupport
protected void saveStateSupport(boolean persist, boolean interim) -
getDownloadManager
-
getInternalName
- Specified by:
getInternalNamein interfaceDiskManagerHelper
-
getDownloadState
- Specified by:
getDownloadStatein interfaceDiskManagerHelper
-
getSaveLocation
- Specified by:
getSaveLocationin interfaceDiskManager
-
getStorageTypes
Description copied from interface:DiskManagerHelperReturns the storage type for all files. According toDiskManagerUtil.convertDMStorageTypeFromString(String), values are:
"R"DiskManagerFileInfo.ST_REORDER
"L"DiskManagerFileInfo.ST_LINEAR
"C"DiskManagerFileInfo.ST_COMPACT
"X"DiskManagerFileInfo.ST_REORDER_COMPACT- Specified by:
getStorageTypesin interfaceDiskManagerHelper
-
getStorageType
Description copied from interface:DiskManagerHelperReturns the storage type for file atfileIndex. According toDiskManagerUtil.convertDMStorageTypeFromString(String), values are:
"R"DiskManagerFileInfo.ST_REORDER
"L"DiskManagerFileInfo.ST_LINEAR
"C"DiskManagerFileInfo.ST_COMPACT
"X"DiskManagerFileInfo.ST_REORDER_COMPACT- Specified by:
getStorageTypein interfaceDiskManagerHelper
-
getStorageTypes
Returns the storage type for each file inDownloadManager. According toDiskManagerUtil.convertDMStorageTypeFromString(String), String values are:
"R"DiskManagerFileInfo.ST_REORDER
"L"DiskManagerFileInfo.ST_LINEAR
"C"DiskManagerFileInfo.ST_COMPACT
"X"DiskManagerFileInfo.ST_REORDER_COMPACT -
getStorageType
Returns the storage type for aDownloadManager's file atfileIndex. According toDiskManagerUtil.convertDMStorageTypeFromString(String), values are:
"R"DiskManagerFileInfo.ST_REORDER
"L"DiskManagerFileInfo.ST_LINEAR
"C"DiskManagerFileInfo.ST_COMPACT
"X"DiskManagerFileInfo.ST_REORDER_COMPACT -
getRelationText
Description copied from class:LogRelationA short description of what your class holds that can be printed by the logger- Overrides:
getRelationTextin classLogRelation- Returns:
-
getQueryableInterfaces
Description copied from class:LogRelationQuery this class for a reference to another class that it may hold- Overrides:
getQueryableInterfacesin classLogRelation- Returns:
- If found, the class desired. Otherwise, null.
-
getRecheckScheduler
- Specified by:
getRecheckSchedulerin interfaceDiskManagerHelper
-
isInteresting
public boolean isInteresting(int pieceNumber) - Specified by:
isInterestingin interfaceDiskManager- Parameters:
pieceNumber-- Returns:
- true if the pieceNumber is Needed and not Done
-
isDone
public boolean isDone(int pieceNumber) - Specified by:
isDonein interfaceDiskManager
-
getPriorityChangeMarker
public long getPriorityChangeMarker()- Specified by:
getPriorityChangeMarkerin interfaceDiskManager
-
generateEvidence
- Specified by:
generateEvidencein interfaceDiskManager
-