Package com.biglybt.core.download
Interface DownloadManagerState
- All Known Implementing Classes:
DownloadManagerStateImpl
,DownloadManagerStateImpl.nullState
,LWSDiskManagerState
public interface DownloadManagerState
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final Object[][]
static final int
static final int
static final long
static final long
static final long
static final int
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final Object[][]
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(DownloadManagerStateAttributeListener l, String attribute, int event_type) void
void
void
void
delete()
deletes the saved statevoid
void
dump
(IndentWriter writer) boolean
exportState
(File target_dir) void
generateEvidence
(IndentWriter writer, boolean full) boolean
getAttribute
(String name) boolean
getBooleanAttribute
(String name) boolean
getBooleanParameter
(String name) int
getFileFlags
(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)boolean
getFlag
(long flag) long
getFlags()
int
getIntAttribute
(String name) int
getIntParameter
(String name) String[]
getListAttribute
(String name) getListAttribute
(String name, int idx) long
getLongAttribute
(String name) long
getLongParameter
(String name) getMapAttribute
(String name) String[]
default Boolean
String[]
Ordered by time, most recent lastgetTransientAttribute
(String name) boolean
getTransientFlag
(long flag) long
boolean
hasAttribute
(String name) boolean
isNetworkEnabled
(String network) boolean
boolean
isPeerSourceEnabled
(String peerSource) boolean
isPeerSourcePermitted
(String peerSource) boolean
boolean
parameterExists
(String name) void
removeAttribute
(String name) void
removeListener
(DownloadManagerStateAttributeListener l, String attribute, int event_type) void
void
save
(boolean interim) void
setActive
(boolean active) void
setAttribute
(String name, String value) void
setAttribute
(String name, String value, boolean setDirty) void
setBooleanAttribute
(String name, boolean value) void
setBooleanParameter
(String name, boolean value) void
setCategory
(Category cat) void
setDisplayName
(String name) void
setFileFlags
(int file_index, int flags) void
setFileLink
(int source_index, File link_source, File link_destination) void
setFileLinks
(List<Integer> source_indexes, List<File> link_sources_may_have_nulls, List<File> link_destinations) void
setFlag
(long flag, boolean set) void
setIntAttribute
(String name, int value) void
setIntParameter
(String name, int value) void
setListAttribute
(String name, String[] values) void
setLongAttribute
(String name, long value) void
setLongParameter
(String name, long value) void
setMapAttribute
(String name, Map value) void
setNetworkEnabled
(String network, boolean enabled) void
setNetworks
(String[] networks) default void
setOptionalBooleanAttribute
(String name, Boolean value) void
setParameterDefault
(String name) Reset to default valuevoid
setPeerSourceEnabled
(String source, boolean enabled) void
setPeerSourcePermitted
(String peerSource, boolean permitted) void
setPeerSources
(String[] sources) void
setResumeData
(Map data) void
setTrackerClientExtensions
(String value) void
setTrackerResponseCache
(Map value) void
setTransientAttribute
(String name, Object value) void
setTransientFlag
(long flag, boolean set) void
setUserComment
(String name) void
suppressStateSave
(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:
-
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_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
Reset to default value- Parameters:
name
-
-
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
-