Interface DownloadManagerState
- All Known Implementing Classes:
DownloadManagerStateImpl, DownloadManagerStateImpl.nullState, LWSDiskManagerState
public interface DownloadManagerState
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Object[][]static final intstatic final intstatic final longstatic final longstatic final longstatic final longstatic final longstatic final intstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Object[][]static final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(DownloadManagerStateAttributeListener l, String attribute, int event_type) voidvoidvoidvoiddelete()deletes the saved statevoidvoiddump(IndentWriter writer) booleanexportState(File target_dir) voidgenerateEvidence(IndentWriter writer, boolean full) booleangetAttribute(String name) booleangetBooleanAttribute(String name) booleangetBooleanParameter(String name) intgetFileFlags(int file_index) getFileLink(int source_index) getFileLink(int source_index, StringInterner.FileKey def) Returns file link if it exists, def if notreturns a File -> File map of the defined links (empty if no links)booleangetFlag(long flag) longgetFlags()intgetIntAttribute(String name) intgetIntParameter(String name) String[]getListAttribute(String name) getListAttribute(String name, int idx) longgetLongAttribute(String name) longgetLongParameter(String name) getMapAttribute(String name) String[]default BooleanString[]Ordered by time, most recent lastgetTransientAttribute(String name) booleangetTransientFlag(long flag) longbooleanhasAttribute(String name) booleanisNetworkEnabled(String network) booleanbooleanisPeerSourceEnabled(String peerSource) booleanisPeerSourcePermitted(String peerSource) booleanbooleanparameterExists(String name) voidremoveAttribute(String name) voidremoveListener(DownloadManagerStateAttributeListener l, String attribute, int event_type) voidvoidsave(boolean interim) voidsetActive(boolean active) voidsetAttribute(String name, String value) voidsetAttribute(String name, String value, boolean setDirty) voidsetBooleanAttribute(String name, boolean value) voidsetBooleanParameter(String name, boolean value) voidsetCategory(Category cat) voidsetDisplayName(String name) voidsetFileFlags(int file_index, int flags) voidsetFileLink(int source_index, File link_source, File link_destination) voidsetFileLinks(List<Integer> source_indexes, List<File> link_sources_may_have_nulls, List<File> link_destinations) voidsetFlag(long flag, boolean set) voidsetIntAttribute(String name, int value) voidsetIntParameter(String name, int value) voidsetListAttribute(String name, String[] values) voidsetLongAttribute(String name, long value) voidsetLongParameter(String name, long value) voidsetMapAttribute(String name, Map value) voidsetNetworkEnabled(String network, boolean enabled) voidsetNetworks(String[] networks) default voidsetOptionalBooleanAttribute(String name, Boolean value) voidsetParameterDefault(String name) Reset to default valuevoidsetPeerSourceEnabled(String source, boolean enabled) voidsetPeerSourcePermitted(String peerSource, boolean permitted) voidsetPeerSources(String[] sources) voidsetResumeData(Map data) voidsetTrackerClientExtensions(String value) voidsetTrackerResponseCache(Map value) voidsetTransientAttribute(String name, Object value) voidsetTransientFlag(long flag, boolean set) voidsetUserComment(String name) voidsuppressStateSave(boolean suppress) This method should only be invoked in matching try-finally pairs.
-
Field Details
-
FAS_DEFAULT
static final long FAS_DEFAULT- See Also:
-
FAS_ZERO_NEW
static final long FAS_ZERO_NEW- See Also:
-
FAS_ZERO_NEW_STOP
static final long FAS_ZERO_NEW_STOP- See Also:
-
FAS_SPARSE
static final long FAS_SPARSE- See Also:
-
FAS_SPARSE_ZERO_LENGTH
static final long FAS_SPARSE_ZERO_LENGTH- See Also:
-
AT_VERSION
- See Also:
-
AT_CATEGORY
- See Also:
-
AT_NETWORKS
- See Also:
-
AT_USER
- See Also:
-
AT_PEER_SOURCES
- See Also:
-
AT_PEER_SOURCES_DENIED
- See Also:
-
AT_TRACKER_CLIENT_EXTENSIONS
- See Also:
-
AT_FILE_LINKS2
- See Also:
-
AT_FILE_ALLOC_REQUEST
- See Also:
-
AT_FILE_STORE_TYPES
- See Also:
-
AT_FILE_DOWNLOADED
- See Also:
-
AT_FLAGS
- See Also:
-
AT_PARAMETERS
- See Also:
-
AT_DISPLAY_NAME
- See Also:
-
AT_USER_COMMENT
- See Also:
-
AT_RELATIVE_SAVE_PATH
- See Also:
-
AT_SECRETS
- See Also:
-
AT_RESUME_STATE
- See Also:
-
AT_PRIMARY_FILE_IDX
- See Also:
-
AT_PRIMARY_FILE_PATH
- See Also:
-
AT_TIME_SINCE_DOWNLOAD
- See Also:
-
AT_TIME_SINCE_UPLOAD
- See Also:
-
AT_AVAIL_BAD_TIME
- See Also:
-
AT_TIME_STOPPED
- See Also:
-
AT_INCOMP_FILE_SUFFIX
- See Also:
-
AT_SCRAPE_CACHE
- See Also:
-
AT_SCRAPE_CACHE_SOURCE
- See Also:
-
AT_REORDER_MIN_MB
- See Also:
-
AT_MD_INFO_DICT_SIZE
- See Also:
-
AT_FILE_OTHER_HASHES
- See Also:
-
AT_CANONICAL_SD_DMAP
- See Also:
-
AT_DND_SUBFOLDER
- See Also:
-
AT_DND_ALT_LOC
- See Also:
-
AT_PEAK_RECEIVE_RATE
- See Also:
-
AT_PEAK_SEND_RATE
- See Also:
-
AT_DL_FILE_ALERTS
- See Also:
-
AT_SHARE_RATIO_PROGRESS
- See Also:
-
AT_FILES_EXPANDED
- See Also:
-
AT_MERGED_DATA
- See Also:
-
AT_DND_PREFIX
- See Also:
-
AT_AGGREGATE_SCRAPE_CACHE
- See Also:
-
AT_COMPLETE_LAST_TIME
- See Also:
-
AT_LAST_ADDED_TO_ACTIVE_TAG
- See Also:
-
AT_MOVE_ON_COMPLETE_DIR
- See Also:
-
AT_FILE_FLAGS
- See Also:
-
AT_FILE_ALLOC_STRATEGY
- See Also:
-
AT_FILE_ALLOC_ORDER
- See Also:
-
AT_TRACKER_SESSION_STATS
- See Also:
-
AT_TORRENT_SAVE_TIME
- See Also:
-
AT_TORRENT_EXPORT_PROPAGATED
- See Also:
-
AT_SWARM_TAGS
- See Also:
-
AT_MASK_DL_COMP_OPTIONAL
- See Also:
-
AT_REAL_DM_MAGNET_TIME
- See Also:
-
AT_PLUGIN_OPTIONS
- See Also:
-
AT_PO_ENABLE_ANNOUNCE
- See Also:
-
AT_SET_FILE_PRIORITY_REM_PIECE
- See Also:
-
AT_SET_FILE_PRIORITY_REM_PERCENT
- See Also:
-
AT_LAST_SCRAPE_TIME
- See Also:
-
AT_SKIPPED_FILESET_SIZE
- See Also:
-
AT_SKIPPED_BUT_DOWNLOADED
- See Also:
-
AT_TRANSIENT_FLAGS
- See Also:
-
AT_TRANSIENT_TAG_SORT
- See Also:
-
AT_VIEW_FILTERS
- See Also:
-
ATTRIBUTE_DEFAULTS
-
FLAG_ONLY_EVER_SEEDED
static final long FLAG_ONLY_EVER_SEEDED- See Also:
-
FLAG_SCAN_INCOMPLETE_PIECES
static final long FLAG_SCAN_INCOMPLETE_PIECES- See Also:
-
FLAG_DISABLE_AUTO_FILE_MOVE
static final long FLAG_DISABLE_AUTO_FILE_MOVE- See Also:
-
FLAG_MOVE_ON_COMPLETION_DONE
static final long FLAG_MOVE_ON_COMPLETION_DONE- See Also:
-
FLAG_LOW_NOISE
static final long FLAG_LOW_NOISE- See Also:
-
FLAG_ALLOW_PERMITTED_PEER_SOURCE_CHANGES
static final long FLAG_ALLOW_PERMITTED_PEER_SOURCE_CHANGES- See Also:
-
FLAG_DO_NOT_DELETE_DATA_ON_REMOVE
static final long FLAG_DO_NOT_DELETE_DATA_ON_REMOVE- See Also:
-
FLAG_FORCE_DIRECT_DELETE
static final long FLAG_FORCE_DIRECT_DELETE- See Also:
-
FLAG_DISABLE_IP_FILTER
static final long FLAG_DISABLE_IP_FILTER- See Also:
-
FLAG_METADATA_DOWNLOAD
static final long FLAG_METADATA_DOWNLOAD- See Also:
-
FLAG_ERROR_REPORTED
static final long FLAG_ERROR_REPORTED- See Also:
-
FLAG_INITIAL_NETWORKS_SET
static final long FLAG_INITIAL_NETWORKS_SET- See Also:
-
FLAG_SEQUENTIAL_DOWNLOAD
static final long FLAG_SEQUENTIAL_DOWNLOAD- See Also:
-
FLAG_DISABLE_STOP_AFTER_ALLOC
static final long FLAG_DISABLE_STOP_AFTER_ALLOC- See Also:
-
FILE_FLAG_NOT_NEW
static final int FILE_FLAG_NOT_NEW- See Also:
-
PARAM_MAX_PEERS
- See Also:
-
PARAM_MAX_PEERS_WHEN_SEEDING
- See Also:
-
PARAM_MAX_PEERS_WHEN_SEEDING_ENABLED
- See Also:
-
PARAM_MAX_SEEDS
- See Also:
-
PARAM_MAX_UPLOADS
- See Also:
-
PARAM_MAX_UPLOADS_WHEN_SEEDING
- See Also:
-
PARAM_MAX_UPLOADS_WHEN_SEEDING_ENABLED
- See Also:
-
PARAM_STATS_COUNTED
- See Also:
-
PARAM_DOWNLOAD_ADDED_TIME
- See Also:
-
PARAM_DOWNLOAD_COMPLETED_TIME
- See Also:
-
PARAM_DOWNLOAD_FILE_COMPLETED_TIME
- See Also:
-
PARAM_DOWNLOAD_LAST_ACTIVE_TIME
- See Also:
-
PARAM_MAX_UPLOAD_WHEN_BUSY
- See Also:
-
PARAM_DND_FLAGS
- See Also:
-
PARAM_RANDOM_SEED
- See Also:
-
PARAM_UPLOAD_PRIORITY
- See Also:
-
PARAM_MIN_SHARE_RATIO
- See Also:
-
PARAM_MAX_SHARE_RATIO
- See Also:
-
DEFAULT_MAX_UPLOADS
static final int DEFAULT_MAX_UPLOADS- See Also:
-
MIN_MAX_UPLOADS
static final int MIN_MAX_UPLOADS- See Also:
-
DEFAULT_UPLOAD_PRIORITY
static final int DEFAULT_UPLOAD_PRIORITY- See Also:
-
PARAMETERS
-
TRANSIENT_FLAG_FRIEND_FP
static final int TRANSIENT_FLAG_FRIEND_FP- See Also:
-
TRANSIENT_FLAG_TAG_FP
static final int TRANSIENT_FLAG_TAG_FP- See Also:
-
TRANSIENT_FLAG_TAG_NOT_FP
static final int TRANSIENT_FLAG_TAG_NOT_FP- See Also:
-
-
Method Details
-
getTorrent
TOTorrent getTorrent() -
getDownloadManager
DownloadManager getDownloadManager() -
getStateDir
File getStateDir() -
getAndClearRecoveredStatus
boolean getAndClearRecoveredStatus() -
setFlag
void setFlag(long flag, boolean set) -
getFlag
boolean getFlag(long flag) -
getFlags
long getFlags() -
setTransientFlag
void setTransientFlag(long flag, boolean set) -
getTransientFlag
boolean getTransientFlag(long flag) -
getTransientFlags
long getTransientFlags() -
getTransientAttribute
-
setTransientAttribute
-
setParameterDefault
-
getIntParameter
-
setIntParameter
-
getLongParameter
-
setLongParameter
-
getBooleanParameter
-
setBooleanParameter
-
clearResumeData
void clearResumeData() -
getResumeData
Map getResumeData() -
setResumeData
-
isResumeDataComplete
boolean isResumeDataComplete() -
getResumeDataHistory
List<DownloadManagerState.ResumeHistory> getResumeDataHistory()Ordered by time, most recent last- Returns:
-
restoreResumeData
-
clearTrackerResponseCache
void clearTrackerResponseCache() -
getTrackerResponseCache
Map getTrackerResponseCache() -
setTrackerResponseCache
-
getCategory
Category getCategory() -
setCategory
-
getDisplayName
String getDisplayName() -
setDisplayName
-
getUserComment
String getUserComment() -
setUserComment
-
getRelativeSavePath
String getRelativeSavePath() -
getPrimaryFile
DiskManagerFileInfo getPrimaryFile() -
getPrimaryFilePath
String getPrimaryFilePath() -
getTrackerClientExtensions
String getTrackerClientExtensions() -
setTrackerClientExtensions
-
getNetworks
String[] getNetworks() -
isNetworkEnabled
-
setNetworks
-
setNetworkEnabled
-
getPeerSources
String[] getPeerSources() -
isPeerSourcePermitted
-
setPeerSourcePermitted
-
isPeerSourceEnabled
-
setPeerSources
-
setPeerSourceEnabled
-
setFileLink
-
setFileLinks
-
clearFileLinks
void clearFileLinks() -
getFileLink
-
getFileLink
Returns file link if it exists, def if not- Parameters:
source_index-def-- Returns:
-
getFileLinks
LinkFileMap getFileLinks()returns a File -> File map of the defined links (empty if no links)- Returns:
-
getFileFlags
int getFileFlags(int file_index) -
setFileFlags
void setFileFlags(int file_index, int flags) -
isOurContent
boolean isOurContent()- Returns:
-
setAttribute
-
setAttribute
-
getAttribute
-
setMapAttribute
-
getMapAttribute
-
setListAttribute
-
getListAttribute
-
getListAttribute
-
setIntAttribute
-
getIntAttribute
-
setLongAttribute
-
getLongAttribute
-
setBooleanAttribute
-
getBooleanAttribute
-
hasAttribute
-
removeAttribute
-
getOptionalBooleanAttribute
-
setOptionalBooleanAttribute
-
setActive
void setActive(boolean active) -
discardFluff
void discardFluff() -
save
void save(boolean interim) -
exportState
-
delete
void delete()deletes the saved state -
parameterExists
- Parameters:
name-- Returns:
-
generateEvidence
-
dump
-
suppressStateSave
void suppressStateSave(boolean suppress) This method should only be invoked in matching try-finally pairs. If it is invoked with true multiple times it must be invoked with false the equal amount of times to reallow state writes- Parameters:
suppress- when set to true prevents flushing of the state/increments the internal nesting counter, decrements/allows flush otherwise
-
addListener
-
removeListener
-