Class DownloadHistoryManagerImpl
java.lang.Object
com.biglybt.core.history.impl.DownloadHistoryManagerImpl
- All Implemented Interfaces:
DownloadHistoryManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate class -
Field Summary
FieldsModifier and TypeFieldDescription(package private) intprivate longprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate final Coreprivate ByteArrayHashMap<long[]> private longprivate int(package private) intprivate long(package private) booleanprivate booleanprivate final ListenerManager<DownloadHistoryListener> (package private) final Objectprivate AtomicIntegerprivate static String[]private static final Objectprivate static final TagManagerprivate static final intprivate static final intprivate static final int(package private) TimerEvent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(DownloadHistoryListener listener, boolean fire_for_existing) (package private) voidprivate void(package private) Map<Long, DownloadHistoryManagerImpl.DownloadHistoryImpl> long[]getDates(byte[] hash, boolean with_redownload) private ByteArrayHashMap<long[]> (package private) Map<Long, DownloadHistoryManagerImpl.DownloadHistoryImpl> int(package private) static long(package private) voidhistoryUpdated(DownloadHistory dh, int action, int type) private voidhistoryUpdated(Collection<DownloadHistory> list, int action, int type) boolean(package private) booleanloadHistory(String file) voidremoveHistory(List<DownloadHistory> to_remove) voidremoveListener(DownloadHistoryListener listener) voidprivate voidsaveHistory(String file, Map<Long, DownloadHistoryManagerImpl.DownloadHistoryImpl> records) searchHistory(Map<String, Object> search_parameters, SearchObserver observer) voidsetEnabled(boolean enabled) (package private) voidsetEnabledSupport(boolean b, boolean startup) (package private) voidprivate voidsyncFromExisting(GlobalManager global_manager) (package private) void
-
Field Details
-
CONFIG_ENABLED
- See Also:
-
CONFIG_ACTIVE_FILE
- See Also:
-
CONFIG_DEAD_FILE
- See Also:
-
CONFIG_ACTIVE_SIZE
- See Also:
-
CONFIG_DEAD_SIZE
- See Also:
-
UPDATE_TYPE_ACTIVE
private static final int UPDATE_TYPE_ACTIVE- See Also:
-
UPDATE_TYPE_DEAD
private static final int UPDATE_TYPE_DEAD- See Also:
-
UPDATE_TYPE_BOTH
private static final int UPDATE_TYPE_BOTH- See Also:
-
TAG_CACHE_KEY
-
core
-
tag_manager
-
listeners
-
lock
-
mutation_count
-
history_active
-
history_dead
-
active_history_size
volatile int active_history_size -
dead_history_size
volatile int dead_history_size -
active_dirty
-
dead_dirty
-
write_pending_event
TimerEvent write_pending_event -
active_load_time
private long active_load_time -
dead_load_time
private long dead_load_time -
history_escaped
private boolean history_escaped -
redownload_cache
-
dates_cache
-
dates_cache_mutation_count
private volatile int dates_cache_mutation_count -
dates_cache_last_access
private volatile long dates_cache_last_access -
enabled
boolean enabled -
NO_TAGS
-
-
Constructor Details
-
DownloadHistoryManagerImpl
public DownloadHistoryManagerImpl()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceDownloadHistoryManager
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabledin interfaceDownloadHistoryManager
-
setEnabledSupport
void setEnabledSupport(boolean b, boolean startup) -
isMonitored
-
syncFromExisting
-
getHistory
- Specified by:
getHistoryin interfaceDownloadHistoryManager
-
getHistoryCount
public int getHistoryCount()- Specified by:
getHistoryCountin interfaceDownloadHistoryManager
-
removeHistory
- Specified by:
removeHistoryin interfaceDownloadHistoryManager
-
clearHistory
private void clearHistory() -
resetHistory
public void resetHistory()- Specified by:
resetHistoryin interfaceDownloadHistoryManager
-
getDates
public long[] getDates(byte[] hash, boolean with_redownload) - Specified by:
getDatesin interfaceDownloadHistoryManager- Returns:
- [ added, completed, removed, redownloaded (transient)]
-
getDatesCache
-
setRedownloading
-
getUID
-
addListener
- Specified by:
addListenerin interfaceDownloadHistoryManager
-
removeListener
- Specified by:
removeListenerin interfaceDownloadHistoryManager
-
getActiveHistory
Map<Long, DownloadHistoryManagerImpl.DownloadHistoryImpl> getActiveHistory() -
getDeadHistory
Map<Long, DownloadHistoryManagerImpl.DownloadHistoryImpl> getDeadHistory() -
historyUpdated
-
historyUpdated
-
checkDiscard
void checkDiscard() -
writeHistory
void writeHistory() -
loadHistory
-
saveHistory
private void saveHistory(String file, Map<Long, DownloadHistoryManagerImpl.DownloadHistoryImpl> records) -
searchHistory
public SearchInstance searchHistory(Map<String, Object> search_parameters, SearchObserver observer) throws SearchException- Throws:
SearchException
-