com.aelitis.azureus.core.lws
Class LWSDiskManagerState
java.lang.Object
com.aelitis.azureus.core.lws.LWSDiskManagerState
- All Implemented Interfaces:
- DownloadManagerState
public class LWSDiskManagerState
- extends Object
- implements DownloadManagerState
Fields inherited from interface org.gudy.azureus2.core3.download.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_PREFIX, AT_DND_SUBFOLDER, AT_FILE_DOWNLOADED, AT_FILE_LINKS_DEPRECATED, 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_MD_INFO_DICT_SIZE, AT_MERGED_DATA, AT_NETWORKS, AT_PARAMETERS, AT_PEAK_RECEIVE_RATE, AT_PEAK_SEND_RATE, AT_PEER_SOURCES, AT_PEER_SOURCES_DENIED, AT_PRIMARY_FILE, AT_PRIMARY_FILE_IDX, AT_RELATIVE_SAVE_PATH, AT_REORDER_MIN_MB, AT_RESUME_STATE, AT_SCRAPE_CACHE, AT_SCRAPE_CACHE_SOURCE, AT_SECRETS, AT_SHARE_RATIO_PROGRESS, AT_TIME_SINCE_DOWNLOAD, AT_TIME_SINCE_UPLOAD, AT_TIME_STOPPED, AT_TRACKER_CLIENT_EXTENSIONS, AT_USER, AT_USER_COMMENT, AT_VERSION, ATTRIBUTE_DEFAULTS, DEFAULT_MAX_UPLOADS, DEFAULT_UPLOAD_PRIORITY, FLAG_ALLOW_PERMITTED_PEER_SOURCE_CHANGES, FLAG_DISABLE_AUTO_FILE_MOVE, FLAG_DISABLE_IP_FILTER, 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, 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 |
Method Summary |
void |
addListener(DownloadManagerStateAttributeListener l,
String attribute,
int event_type)
|
void |
addListener(DownloadManagerStateListener l)
|
void |
clearFileLinks()
|
void |
clearResumeData()
|
void |
clearTrackerResponseCache()
|
void |
delete()
deletes the saved state |
void |
discardFluff()
|
void |
dump(IndentWriter writer)
|
boolean |
exportState(File target_dir)
|
void |
generateEvidence(IndentWriter writer)
|
String |
getAttribute(String name)
|
boolean |
getBooleanAttribute(String name)
|
boolean |
getBooleanParameter(String name)
|
Category |
getCategory()
|
String |
getDisplayName()
|
DownloadManager |
getDownloadManager()
|
File |
getFileLink(int source_index,
File link_source)
|
LinkFileMap |
getFileLinks()
returns 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)
|
String |
getListAttribute(String name,
int idx)
|
long |
getLongAttribute(String name)
|
long |
getLongParameter(String name)
|
Map |
getMapAttribute(String name)
|
String[] |
getNetworks()
|
String[] |
getPeerSources()
|
DiskManagerFileInfo |
getPrimaryFile()
|
String |
getRelativeSavePath()
|
Map |
getResumeData()
|
File |
getStateFile()
|
File |
getStateFile(String name)
|
TOTorrent |
getTorrent()
|
String |
getTrackerClientExtensions()
|
Map |
getTrackerResponseCache()
|
String |
getUserComment()
|
boolean |
hasAttribute(String name)
|
boolean |
isNetworkEnabled(String network)
|
boolean |
isOurContent()
|
boolean |
isPeerSourceEnabled(String peerSource)
|
boolean |
isPeerSourcePermitted(String peerSource)
|
boolean |
isResumeDataComplete()
|
boolean |
parameterExists(String name)
|
void |
removeListener(DownloadManagerStateAttributeListener l,
String attribute,
int event_type)
|
void |
removeListener(DownloadManagerStateListener l)
|
void |
save()
|
void |
setActive(boolean a)
|
void |
setAttribute(String name,
String value)
|
void |
setBooleanAttribute(String name,
boolean value)
|
void |
setBooleanParameter(String name,
boolean value)
|
void |
setCategory(Category cat)
|
void |
setDisplayName(String name)
|
void |
setFileLink(int source_index,
File link_source,
File link_destination)
|
void |
setFileLinks(List<Integer> source_indexes,
List<File> link_sources,
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)
|
void |
setParameterDefault(String name)
Reset to default value |
void |
setPeerSourceEnabled(String source,
boolean enabled)
|
void |
setPeerSourcePermitted(String peerSource,
boolean permitted)
|
void |
setPeerSources(String[] networks)
|
void |
setPrimaryFile(DiskManagerFileInfo dmfi)
|
void |
setRelativeSavePath(String path)
|
void |
setResumeData(Map data)
|
void |
setTrackerClientExtensions(String value)
|
void |
setTrackerResponseCache(Map value)
|
void |
setUserComment(String name)
|
void |
suppressStateSave(boolean suppress)
This method should only be invoked in matching try-finally pairs. |
void |
supressStateSave(boolean supress)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LWSDiskManagerState
protected LWSDiskManagerState()
getTorrent
public TOTorrent getTorrent()
- Specified by:
getTorrent
in interface DownloadManagerState
getStateFile
public File getStateFile(String name)
getStateFile
public File getStateFile()
- Specified by:
getStateFile
in interface DownloadManagerState
getDownloadManager
public DownloadManager getDownloadManager()
- Specified by:
getDownloadManager
in interface DownloadManagerState
clearResumeData
public void clearResumeData()
- Specified by:
clearResumeData
in interface DownloadManagerState
getResumeData
public Map getResumeData()
- Specified by:
getResumeData
in interface DownloadManagerState
setResumeData
public void setResumeData(Map data)
- Specified by:
setResumeData
in interface DownloadManagerState
isResumeDataComplete
public boolean isResumeDataComplete()
- Specified by:
isResumeDataComplete
in interface DownloadManagerState
clearTrackerResponseCache
public void clearTrackerResponseCache()
- Specified by:
clearTrackerResponseCache
in interface DownloadManagerState
getTrackerResponseCache
public Map getTrackerResponseCache()
- Specified by:
getTrackerResponseCache
in interface DownloadManagerState
setTrackerResponseCache
public void setTrackerResponseCache(Map value)
- Specified by:
setTrackerResponseCache
in interface DownloadManagerState
setFlag
public void setFlag(long flag,
boolean set)
- Specified by:
setFlag
in interface DownloadManagerState
getFlag
public boolean getFlag(long flag)
- Specified by:
getFlag
in interface DownloadManagerState
getFlags
public long getFlags()
- Specified by:
getFlags
in interface DownloadManagerState
isOurContent
public boolean isOurContent()
- Specified by:
isOurContent
in interface DownloadManagerState
- Returns:
getIntParameter
public int getIntParameter(String name)
- Specified by:
getIntParameter
in interface DownloadManagerState
setIntParameter
public void setIntParameter(String name,
int value)
- Specified by:
setIntParameter
in interface DownloadManagerState
getLongParameter
public long getLongParameter(String name)
- Specified by:
getLongParameter
in interface DownloadManagerState
setParameterDefault
public void setParameterDefault(String name)
- Description copied from interface:
DownloadManagerState
- Reset to default value
- Specified by:
setParameterDefault
in interface DownloadManagerState
setLongParameter
public void setLongParameter(String name,
long value)
- Specified by:
setLongParameter
in interface DownloadManagerState
getBooleanParameter
public boolean getBooleanParameter(String name)
- Specified by:
getBooleanParameter
in interface DownloadManagerState
setBooleanParameter
public void setBooleanParameter(String name,
boolean value)
- Specified by:
setBooleanParameter
in interface DownloadManagerState
setAttribute
public void setAttribute(String name,
String value)
- Specified by:
setAttribute
in interface DownloadManagerState
getAttribute
public String getAttribute(String name)
- Specified by:
getAttribute
in interface DownloadManagerState
setIntAttribute
public void setIntAttribute(String name,
int value)
- Specified by:
setIntAttribute
in interface DownloadManagerState
getIntAttribute
public int getIntAttribute(String name)
- Specified by:
getIntAttribute
in interface DownloadManagerState
setLongAttribute
public void setLongAttribute(String name,
long value)
- Specified by:
setLongAttribute
in interface DownloadManagerState
getLongAttribute
public long getLongAttribute(String name)
- Specified by:
getLongAttribute
in interface DownloadManagerState
setBooleanAttribute
public void setBooleanAttribute(String name,
boolean value)
- Specified by:
setBooleanAttribute
in interface DownloadManagerState
getBooleanAttribute
public boolean getBooleanAttribute(String name)
- Specified by:
getBooleanAttribute
in interface DownloadManagerState
hasAttribute
public boolean hasAttribute(String name)
- Specified by:
hasAttribute
in interface DownloadManagerState
getTrackerClientExtensions
public String getTrackerClientExtensions()
- Specified by:
getTrackerClientExtensions
in interface DownloadManagerState
setTrackerClientExtensions
public void setTrackerClientExtensions(String value)
- Specified by:
setTrackerClientExtensions
in interface DownloadManagerState
setListAttribute
public void setListAttribute(String name,
String[] values)
- Specified by:
setListAttribute
in interface DownloadManagerState
getListAttribute
public String[] getListAttribute(String name)
- Specified by:
getListAttribute
in interface DownloadManagerState
getListAttribute
public String getListAttribute(String name,
int idx)
- Specified by:
getListAttribute
in interface DownloadManagerState
setMapAttribute
public void setMapAttribute(String name,
Map value)
- Specified by:
setMapAttribute
in interface DownloadManagerState
getMapAttribute
public Map getMapAttribute(String name)
- Specified by:
getMapAttribute
in interface DownloadManagerState
getCategory
public Category getCategory()
- Specified by:
getCategory
in interface DownloadManagerState
setCategory
public void setCategory(Category cat)
- Specified by:
setCategory
in interface DownloadManagerState
setPrimaryFile
public void setPrimaryFile(DiskManagerFileInfo dmfi)
- Specified by:
setPrimaryFile
in interface DownloadManagerState
getPrimaryFile
public DiskManagerFileInfo getPrimaryFile()
- Specified by:
getPrimaryFile
in interface DownloadManagerState
getNetworks
public String[] getNetworks()
- Specified by:
getNetworks
in interface DownloadManagerState
isNetworkEnabled
public boolean isNetworkEnabled(String network)
- Specified by:
isNetworkEnabled
in interface DownloadManagerState
setNetworks
public void setNetworks(String[] networks)
- Specified by:
setNetworks
in interface DownloadManagerState
setNetworkEnabled
public void setNetworkEnabled(String network,
boolean enabled)
- Specified by:
setNetworkEnabled
in interface DownloadManagerState
getPeerSources
public String[] getPeerSources()
- Specified by:
getPeerSources
in interface DownloadManagerState
isPeerSourcePermitted
public boolean isPeerSourcePermitted(String peerSource)
- Specified by:
isPeerSourcePermitted
in interface DownloadManagerState
setPeerSourcePermitted
public void setPeerSourcePermitted(String peerSource,
boolean permitted)
- Specified by:
setPeerSourcePermitted
in interface DownloadManagerState
isPeerSourceEnabled
public boolean isPeerSourceEnabled(String peerSource)
- Specified by:
isPeerSourceEnabled
in interface DownloadManagerState
setPeerSources
public void setPeerSources(String[] networks)
- Specified by:
setPeerSources
in interface DownloadManagerState
setPeerSourceEnabled
public void setPeerSourceEnabled(String source,
boolean enabled)
- Specified by:
setPeerSourceEnabled
in interface DownloadManagerState
setFileLink
public void setFileLink(int source_index,
File link_source,
File link_destination)
- Specified by:
setFileLink
in interface DownloadManagerState
setFileLinks
public void setFileLinks(List<Integer> source_indexes,
List<File> link_sources,
List<File> link_destinations)
- Specified by:
setFileLinks
in interface DownloadManagerState
discardFluff
public void discardFluff()
- Specified by:
discardFluff
in interface DownloadManagerState
clearFileLinks
public void clearFileLinks()
- Specified by:
clearFileLinks
in interface DownloadManagerState
getFileLink
public File getFileLink(int source_index,
File link_source)
- Specified by:
getFileLink
in interface DownloadManagerState
getFileLinks
public LinkFileMap getFileLinks()
- Description copied from interface:
DownloadManagerState
- returns a File -> File map of the defined links (empty if no links)
- Specified by:
getFileLinks
in interface DownloadManagerState
- Returns:
getUserComment
public String getUserComment()
- Specified by:
getUserComment
in interface DownloadManagerState
setUserComment
public void setUserComment(String name)
- Specified by:
setUserComment
in interface DownloadManagerState
getRelativeSavePath
public String getRelativeSavePath()
- Specified by:
getRelativeSavePath
in interface DownloadManagerState
setRelativeSavePath
public void setRelativeSavePath(String path)
setActive
public void setActive(boolean a)
- Specified by:
setActive
in interface DownloadManagerState
exportState
public boolean exportState(File target_dir)
- Specified by:
exportState
in interface DownloadManagerState
save
public void save()
- Specified by:
save
in interface DownloadManagerState
delete
public void delete()
- Description copied from interface:
DownloadManagerState
- deletes the saved state
- Specified by:
delete
in interface DownloadManagerState
suppressStateSave
public void suppressStateSave(boolean suppress)
- Description copied from interface:
DownloadManagerState
- 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
- Specified by:
suppressStateSave
in interface DownloadManagerState
- Parameters:
suppress
- when set to true prevents flushing of the state/increments the internal nesting
counter, decrements/allows flush otherwise
addListener
public void addListener(DownloadManagerStateListener l)
- Specified by:
addListener
in interface DownloadManagerState
removeListener
public void removeListener(DownloadManagerStateListener l)
- Specified by:
removeListener
in interface DownloadManagerState
addListener
public void addListener(DownloadManagerStateAttributeListener l,
String attribute,
int event_type)
- Specified by:
addListener
in interface DownloadManagerState
removeListener
public void removeListener(DownloadManagerStateAttributeListener l,
String attribute,
int event_type)
- Specified by:
removeListener
in interface DownloadManagerState
generateEvidence
public void generateEvidence(IndentWriter writer)
- Specified by:
generateEvidence
in interface DownloadManagerState
dump
public void dump(IndentWriter writer)
- Specified by:
dump
in interface DownloadManagerState
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interface DownloadManagerState
setDisplayName
public void setDisplayName(String name)
- Specified by:
setDisplayName
in interface DownloadManagerState
parameterExists
public boolean parameterExists(String name)
- Specified by:
parameterExists
in interface DownloadManagerState
- Returns:
supressStateSave
public void supressStateSave(boolean supress)