Class DownloadManagerStateImpl.nullState
java.lang.Object
com.biglybt.core.download.impl.DownloadManagerStateImpl.nullState
- All Implemented Interfaces:
DownloadManagerState
- Enclosing class:
DownloadManagerStateImpl
protected static class DownloadManagerStateImpl.nullState
extends Object
implements DownloadManagerState
-
Nested Class Summary
Nested classes/interfaces inherited from interface DownloadManagerState
DownloadManagerState.ResumeHistory -
Field Summary
FieldsFields inherited from interface DownloadManagerState
AT_AGGREGATE_SCRAPE_CACHE, AT_AVAIL_BAD_TIME, AT_CANONICAL_SD_DMAP, AT_CATEGORY, AT_COMPLETE_LAST_TIME, AT_DISPLAY_NAME, AT_DL_FILE_ALERTS, AT_DND_ALT_LOC, AT_DND_PREFIX, AT_DND_SUBFOLDER, AT_FILE_ALLOC_ORDER, AT_FILE_ALLOC_REQUEST, AT_FILE_ALLOC_STRATEGY, AT_FILE_DOWNLOADED, AT_FILE_FLAGS, AT_FILE_LINKS2, AT_FILE_OTHER_HASHES, AT_FILE_STORE_TYPES, AT_FILES_EXPANDED, AT_FLAGS, AT_INCOMP_FILE_SUFFIX, AT_LAST_ADDED_TO_ACTIVE_TAG, AT_LAST_SCRAPE_TIME, AT_MASK_DL_COMP_OPTIONAL, AT_MD_INFO_DICT_SIZE, AT_MERGED_DATA, AT_MOVE_ON_COMPLETE_DIR, AT_NETWORKS, AT_PARAMETERS, AT_PEAK_RECEIVE_RATE, AT_PEAK_SEND_RATE, AT_PEER_SOURCES, AT_PEER_SOURCES_DENIED, AT_PLUGIN_OPTIONS, AT_PO_ENABLE_ANNOUNCE, AT_PRIMARY_FILE_IDX, AT_PRIMARY_FILE_PATH, AT_REAL_DM_MAGNET_TIME, AT_RELATIVE_SAVE_PATH, AT_REORDER_MIN_MB, AT_RESUME_STATE, AT_SCRAPE_CACHE, AT_SCRAPE_CACHE_SOURCE, AT_SECRETS, AT_SET_FILE_PRIORITY_REM_PERCENT, AT_SET_FILE_PRIORITY_REM_PIECE, AT_SHARE_RATIO_PROGRESS, AT_SKIPPED_BUT_DOWNLOADED, AT_SKIPPED_FILESET_SIZE, AT_SWARM_TAGS, AT_TIME_SINCE_DOWNLOAD, AT_TIME_SINCE_UPLOAD, AT_TIME_STOPPED, AT_TORRENT_EXPORT_PROPAGATED, AT_TORRENT_SAVE_TIME, AT_TRACKER_CLIENT_EXTENSIONS, AT_TRACKER_SESSION_STATS, AT_TRANSIENT_FLAGS, AT_TRANSIENT_TAG_SORT, AT_USER, AT_USER_COMMENT, AT_VERSION, AT_VIEW_FILTERS, ATTRIBUTE_DEFAULTS, DEFAULT_MAX_UPLOADS, DEFAULT_UPLOAD_PRIORITY, FAS_DEFAULT, FAS_SPARSE, FAS_SPARSE_ZERO_LENGTH, FAS_ZERO_NEW, FAS_ZERO_NEW_STOP, FILE_FLAG_NOT_NEW, FLAG_ALLOW_PERMITTED_PEER_SOURCE_CHANGES, FLAG_DISABLE_AUTO_FILE_MOVE, FLAG_DISABLE_IP_FILTER, FLAG_DISABLE_STOP_AFTER_ALLOC, FLAG_DO_NOT_DELETE_DATA_ON_REMOVE, FLAG_ERROR_REPORTED, FLAG_FORCE_DIRECT_DELETE, FLAG_INITIAL_NETWORKS_SET, FLAG_LOW_NOISE, FLAG_METADATA_DOWNLOAD, FLAG_MOVE_ON_COMPLETION_DONE, FLAG_ONLY_EVER_SEEDED, FLAG_SCAN_INCOMPLETE_PIECES, FLAG_SEQUENTIAL_DOWNLOAD, MIN_MAX_UPLOADS, PARAM_DND_FLAGS, PARAM_DOWNLOAD_ADDED_TIME, PARAM_DOWNLOAD_COMPLETED_TIME, PARAM_DOWNLOAD_FILE_COMPLETED_TIME, PARAM_DOWNLOAD_LAST_ACTIVE_TIME, PARAM_MAX_PEERS, PARAM_MAX_PEERS_WHEN_SEEDING, PARAM_MAX_PEERS_WHEN_SEEDING_ENABLED, PARAM_MAX_SEEDS, PARAM_MAX_SHARE_RATIO, PARAM_MAX_UPLOAD_WHEN_BUSY, PARAM_MAX_UPLOADS, PARAM_MAX_UPLOADS_WHEN_SEEDING, PARAM_MAX_UPLOADS_WHEN_SEEDING_ENABLED, PARAM_MIN_SHARE_RATIO, PARAM_RANDOM_SEED, PARAM_STATS_COUNTED, PARAM_UPLOAD_PRIORITY, PARAMETERS, TRANSIENT_FLAG_FRIEND_FP, TRANSIENT_FLAG_TAG_FP, TRANSIENT_FLAG_TAG_NOT_FP -
Constructor Summary
Constructors -
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[]String[]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) voidsetParameterDefault(String name) Reset to default valuevoidsetPeerSourceEnabled(String source, boolean enabled) voidsetPeerSourcePermitted(String peerSource, boolean permitted) voidsetPeerSources(String[] networks) voidsetRelativeSavePath(String name) 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.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DownloadManagerState
getOptionalBooleanAttribute, setOptionalBooleanAttribute
-
Field Details
-
download_manager
-
-
Constructor Details
-
nullState
-
-
Method Details
-
getTorrent
- Specified by:
getTorrentin interfaceDownloadManagerState
-
getStateDir
- Specified by:
getStateDirin interfaceDownloadManagerState
-
getAndClearRecoveredStatus
public boolean getAndClearRecoveredStatus()- Specified by:
getAndClearRecoveredStatusin interfaceDownloadManagerState
-
getDownloadManager
- Specified by:
getDownloadManagerin interfaceDownloadManagerState
-
clearResumeData
public void clearResumeData()- Specified by:
clearResumeDatain interfaceDownloadManagerState
-
getResumeData
- Specified by:
getResumeDatain interfaceDownloadManagerState
-
setResumeData
- Specified by:
setResumeDatain interfaceDownloadManagerState
-
isResumeDataComplete
public boolean isResumeDataComplete()- Specified by:
isResumeDataCompletein interfaceDownloadManagerState
-
getResumeDataHistory
Description copied from interface:DownloadManagerStateOrdered by time, most recent last- Specified by:
getResumeDataHistoryin interfaceDownloadManagerState- Returns:
-
restoreResumeData
- Specified by:
restoreResumeDatain interfaceDownloadManagerState
-
clearTrackerResponseCache
public void clearTrackerResponseCache()- Specified by:
clearTrackerResponseCachein interfaceDownloadManagerState
-
getTrackerResponseCache
- Specified by:
getTrackerResponseCachein interfaceDownloadManagerState
-
setTrackerResponseCache
- Specified by:
setTrackerResponseCachein interfaceDownloadManagerState
-
setFlag
public void setFlag(long flag, boolean set) - Specified by:
setFlagin interfaceDownloadManagerState
-
getFlag
public boolean getFlag(long flag) - Specified by:
getFlagin interfaceDownloadManagerState
-
getFlags
public long getFlags()- Specified by:
getFlagsin interfaceDownloadManagerState
-
setTransientFlag
public void setTransientFlag(long flag, boolean set) - Specified by:
setTransientFlagin interfaceDownloadManagerState
-
getTransientFlag
public boolean getTransientFlag(long flag) - Specified by:
getTransientFlagin interfaceDownloadManagerState
-
getTransientFlags
public long getTransientFlags()- Specified by:
getTransientFlagsin interfaceDownloadManagerState
-
getTransientAttribute
- Specified by:
getTransientAttributein interfaceDownloadManagerState
-
setTransientAttribute
- Specified by:
setTransientAttributein interfaceDownloadManagerState
-
setParameterDefault
Description copied from interface:DownloadManagerStateReset to default value- Specified by:
setParameterDefaultin interfaceDownloadManagerState- Parameters:
name-
-
getLongParameter
- Specified by:
getLongParameterin interfaceDownloadManagerState
-
setLongParameter
- Specified by:
setLongParameterin interfaceDownloadManagerState
-
getIntParameter
- Specified by:
getIntParameterin interfaceDownloadManagerState
-
setIntParameter
- Specified by:
setIntParameterin interfaceDownloadManagerState
-
getBooleanParameter
- Specified by:
getBooleanParameterin interfaceDownloadManagerState
-
setBooleanParameter
- Specified by:
setBooleanParameterin interfaceDownloadManagerState
-
setAttribute
- Specified by:
setAttributein interfaceDownloadManagerState
-
setAttribute
- Specified by:
setAttributein interfaceDownloadManagerState
-
getAttribute
- Specified by:
getAttributein interfaceDownloadManagerState
-
getTrackerClientExtensions
- Specified by:
getTrackerClientExtensionsin interfaceDownloadManagerState
-
setTrackerClientExtensions
- Specified by:
setTrackerClientExtensionsin interfaceDownloadManagerState
-
setListAttribute
- Specified by:
setListAttributein interfaceDownloadManagerState
-
getListAttribute
- Specified by:
getListAttributein interfaceDownloadManagerState
-
getListAttribute
- Specified by:
getListAttributein interfaceDownloadManagerState
-
setMapAttribute
- Specified by:
setMapAttributein interfaceDownloadManagerState
-
getMapAttribute
- Specified by:
getMapAttributein interfaceDownloadManagerState
-
hasAttribute
- Specified by:
hasAttributein interfaceDownloadManagerState
-
removeAttribute
- Specified by:
removeAttributein interfaceDownloadManagerState
-
getIntAttribute
- Specified by:
getIntAttributein interfaceDownloadManagerState
-
getLongAttribute
- Specified by:
getLongAttributein interfaceDownloadManagerState
-
getBooleanAttribute
- Specified by:
getBooleanAttributein interfaceDownloadManagerState
-
setIntAttribute
- Specified by:
setIntAttributein interfaceDownloadManagerState
-
setLongAttribute
- Specified by:
setLongAttributein interfaceDownloadManagerState
-
setBooleanAttribute
- Specified by:
setBooleanAttributein interfaceDownloadManagerState
-
getCategory
- Specified by:
getCategoryin interfaceDownloadManagerState
-
setCategory
- Specified by:
setCategoryin interfaceDownloadManagerState
-
getNetworks
- Specified by:
getNetworksin interfaceDownloadManagerState
-
isNetworkEnabled
- Specified by:
isNetworkEnabledin interfaceDownloadManagerState
-
setNetworks
- Specified by:
setNetworksin interfaceDownloadManagerState
-
setNetworkEnabled
- Specified by:
setNetworkEnabledin interfaceDownloadManagerState
-
getPeerSources
- Specified by:
getPeerSourcesin interfaceDownloadManagerState
-
isPeerSourcePermitted
- Specified by:
isPeerSourcePermittedin interfaceDownloadManagerState
-
setPeerSourcePermitted
- Specified by:
setPeerSourcePermittedin interfaceDownloadManagerState
-
isPeerSourceEnabled
- Specified by:
isPeerSourceEnabledin interfaceDownloadManagerState
-
suppressStateSave
public void suppressStateSave(boolean suppress) Description copied from interface:DownloadManagerStateThis 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- Specified by:
suppressStateSavein interfaceDownloadManagerState- Parameters:
suppress- when set to true prevents flushing of the state/increments the internal nesting counter, decrements/allows flush otherwise
-
setPeerSources
- Specified by:
setPeerSourcesin interfaceDownloadManagerState
-
setPeerSourceEnabled
- Specified by:
setPeerSourceEnabledin interfaceDownloadManagerState
-
setFileLink
- Specified by:
setFileLinkin interfaceDownloadManagerState
-
setFileLinks
public void setFileLinks(List<Integer> source_indexes, List<File> link_sources_may_have_nulls, List<File> link_destinations) - Specified by:
setFileLinksin interfaceDownloadManagerState
-
clearFileLinks
public void clearFileLinks()- Specified by:
clearFileLinksin interfaceDownloadManagerState
-
getFileLink
- Specified by:
getFileLinkin interfaceDownloadManagerState
-
getFileLink
Description copied from interface:DownloadManagerStateReturns file link if it exists, def if not- Specified by:
getFileLinkin interfaceDownloadManagerState- Parameters:
source_index-def-- Returns:
-
getFileLinks
Description copied from interface:DownloadManagerStatereturns a File -> File map of the defined links (empty if no links)- Specified by:
getFileLinksin interfaceDownloadManagerState- Returns:
-
getFileFlags
public int getFileFlags(int file_index) - Specified by:
getFileFlagsin interfaceDownloadManagerState
-
setFileFlags
public void setFileFlags(int file_index, int flags) - Specified by:
setFileFlagsin interfaceDownloadManagerState
-
setActive
public void setActive(boolean active) - Specified by:
setActivein interfaceDownloadManagerState
-
discardFluff
public void discardFluff()- Specified by:
discardFluffin interfaceDownloadManagerState
-
exportState
- Specified by:
exportStatein interfaceDownloadManagerState
-
save
public void save(boolean interim) - Specified by:
savein interfaceDownloadManagerState
-
delete
public void delete()Description copied from interface:DownloadManagerStatedeletes the saved state- Specified by:
deletein interfaceDownloadManagerState
-
addListener
- Specified by:
addListenerin interfaceDownloadManagerState
-
removeListener
public void removeListener(DownloadManagerStateAttributeListener l, String attribute, int event_type) - Specified by:
removeListenerin interfaceDownloadManagerState
-
setDisplayName
- Specified by:
setDisplayNamein interfaceDownloadManagerState
-
getDisplayName
- Specified by:
getDisplayNamein interfaceDownloadManagerState
-
setUserComment
- Specified by:
setUserCommentin interfaceDownloadManagerState
-
getUserComment
- Specified by:
getUserCommentin interfaceDownloadManagerState
-
setRelativeSavePath
-
getRelativeSavePath
- Specified by:
getRelativeSavePathin interfaceDownloadManagerState
-
parameterExists
- Specified by:
parameterExistsin interfaceDownloadManagerState- Parameters:
name-- Returns:
-
generateEvidence
- Specified by:
generateEvidencein interfaceDownloadManagerState
-
dump
- Specified by:
dumpin interfaceDownloadManagerState
-
isOurContent
public boolean isOurContent()- Specified by:
isOurContentin interfaceDownloadManagerState- Returns:
-
getPrimaryFile
- Specified by:
getPrimaryFilein interfaceDownloadManagerState
-
getPrimaryFilePath
- Specified by:
getPrimaryFilePathin interfaceDownloadManagerState
-