Package com.biglybt.core.subs.impl
Class SubscriptionHistoryImpl
java.lang.Object
com.biglybt.core.subs.impl.SubscriptionHistoryImpl
- All Implemented Interfaces:
SubscriptionHistory
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private boolean
private int
private static AsyncDispatcher
private boolean
private boolean
private int
private String
private long
private long
private long
private final SubscriptionManagerImpl
private long
private long
private String[]
private long
private int
private int
private boolean
private final SubscriptionImpl
Fields inherited from interface com.biglybt.core.subs.SubscriptionHistory
DEFAULT_CHECK_INTERVAL_MINS
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SubscriptionHistoryImpl
(SubscriptionManagerImpl _manager, SubscriptionImpl _subs) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkMaxResults
(int max_results) void
void
deleteResults
(String[] result_ids) Delete marks the result as explicitly deleted - it won't be re-discoveredprotected void
int
int
String[]
boolean
long
long
long
long
int
long
long
boolean
int
int
getResults
(boolean include_deleted) protected String
boolean
boolean
protected boolean
boolean
protected void
protected void
protected void
void
void
void
markResults
(String[] result_ids, boolean[] reads) protected void
markResults
(Set<String> hashes, Set<String> name_sizes) protected SubscriptionResultImpl[]
reconcileResults
(Engine engine_maybe_null, SubscriptionResultImpl[] latest_results, boolean allow_reincarnation) void
removeResults
(String[] result_ids) This removes the result, it will be available for re-discovery if filters permitvoid
reset()
protected void
saveConfig
(int reason) void
setAutoDownload
(boolean _auto_dl) void
setCheckFrequencyMins
(int mins) void
setDetails
(boolean _enabled, boolean _auto_dl) void
setDownloadNetworks
(String[] nets) void
setDownloadWithReferer
(boolean b) void
setEnabled
(boolean _enabled) protected void
setFatalError
(String _error) protected void
setLastError
(String _last_error, boolean _auth_failed) void
setMaxAgeSecs
(long max) void
setMaxNonDeletedResults
(int _max_results) void
setNextScheduledUpdate
(long when) void
setNotificationPostEnabled
(boolean enabled) protected void
updateReadUnread
(SubscriptionResultImpl[] results) protected void
updateResult
(SubscriptionResultImpl result)
-
Field Details
-
dispatcher
-
manager
-
subs
-
enabled
private boolean enabled -
auto_dl
private boolean auto_dl -
post_notifications
private boolean post_notifications -
last_scan
private long last_scan -
last_new_result
private long last_new_result -
num_unread
private int num_unread -
num_read
private int num_read -
max_results
private long max_results -
networks
-
max_age_secs
private long max_age_secs -
next_scheduled
private long next_scheduled -
last_error
-
last_error_time
private long last_error_time -
auth_failed
private boolean auth_failed -
consec_fails
private int consec_fails -
auto_dl_supported
private boolean auto_dl_supported -
dl_with_ref
private boolean dl_with_ref -
interval_override
private int interval_override
-
-
Constructor Details
-
SubscriptionHistoryImpl
-
-
Method Details
-
reconcileResults
protected SubscriptionResultImpl[] reconcileResults(Engine engine_maybe_null, SubscriptionResultImpl[] latest_results, boolean allow_reincarnation) -
getSubscription
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceSubscriptionHistory
-
setEnabled
public void setEnabled(boolean _enabled) - Specified by:
setEnabled
in interfaceSubscriptionHistory
-
isAutoDownload
public boolean isAutoDownload()- Specified by:
isAutoDownload
in interfaceSubscriptionHistory
-
setAutoDownload
public void setAutoDownload(boolean _auto_dl) - Specified by:
setAutoDownload
in interfaceSubscriptionHistory
-
getMaxNonDeletedResults
public int getMaxNonDeletedResults()- Specified by:
getMaxNonDeletedResults
in interfaceSubscriptionHistory
-
setMaxNonDeletedResults
public void setMaxNonDeletedResults(int _max_results) - Specified by:
setMaxNonDeletedResults
in interfaceSubscriptionHistory
-
getDownloadNetworks
- Specified by:
getDownloadNetworks
in interfaceSubscriptionHistory
-
setDownloadNetworks
- Specified by:
setDownloadNetworks
in interfaceSubscriptionHistory
-
getMaxAgeSecs
public long getMaxAgeSecs()- Specified by:
getMaxAgeSecs
in interfaceSubscriptionHistory
-
setMaxAgeSecs
public void setMaxAgeSecs(long max) - Specified by:
setMaxAgeSecs
in interfaceSubscriptionHistory
-
getNotificationPostEnabled
public boolean getNotificationPostEnabled()- Specified by:
getNotificationPostEnabled
in interfaceSubscriptionHistory
-
setNotificationPostEnabled
public void setNotificationPostEnabled(boolean enabled) - Specified by:
setNotificationPostEnabled
in interfaceSubscriptionHistory
-
setDetails
public void setDetails(boolean _enabled, boolean _auto_dl) - Specified by:
setDetails
in interfaceSubscriptionHistory
-
downloadNow
protected void downloadNow() -
getLastScanTime
public long getLastScanTime()- Specified by:
getLastScanTime
in interfaceSubscriptionHistory
-
getLastNewResultTime
public long getLastNewResultTime()- Specified by:
getLastNewResultTime
in interfaceSubscriptionHistory
-
setNextScheduledUpdate
public void setNextScheduledUpdate(long when) - Specified by:
setNextScheduledUpdate
in interfaceSubscriptionHistory
-
getNextScheduledUpdate
public long getNextScheduledUpdate()- Specified by:
getNextScheduledUpdate
in interfaceSubscriptionHistory
-
getNextScanTime
public long getNextScanTime()- Specified by:
getNextScanTime
in interfaceSubscriptionHistory
-
getCheckFrequencyMins
public int getCheckFrequencyMins()- Specified by:
getCheckFrequencyMins
in interfaceSubscriptionHistory
-
setCheckFrequencyMins
public void setCheckFrequencyMins(int mins) - Specified by:
setCheckFrequencyMins
in interfaceSubscriptionHistory
-
getNumUnread
public int getNumUnread()- Specified by:
getNumUnread
in interfaceSubscriptionHistory
-
getNumRead
public int getNumRead()- Specified by:
getNumRead
in interfaceSubscriptionHistory
-
getResults
- Specified by:
getResults
in interfaceSubscriptionHistory
-
getResult
- Specified by:
getResult
in interfaceSubscriptionHistory
-
updateResult
-
deleteResults
Description copied from interface:SubscriptionHistory
Delete marks the result as explicitly deleted - it won't be re-discovered- Specified by:
deleteResults
in interfaceSubscriptionHistory
- Parameters:
result_ids
-
-
deleteAllResults
public void deleteAllResults()- Specified by:
deleteAllResults
in interfaceSubscriptionHistory
-
removeResults
Description copied from interface:SubscriptionHistory
This removes the result, it will be available for re-discovery if filters permit- Specified by:
removeResults
in interfaceSubscriptionHistory
- Parameters:
result_ids
-
-
markAllResultsRead
public void markAllResultsRead()- Specified by:
markAllResultsRead
in interfaceSubscriptionHistory
-
markAllResultsUnread
public void markAllResultsUnread()- Specified by:
markAllResultsUnread
in interfaceSubscriptionHistory
-
markResults
- Specified by:
markResults
in interfaceSubscriptionHistory
-
markResults
-
reset
public void reset()- Specified by:
reset
in interfaceSubscriptionHistory
-
checkMaxResults
protected void checkMaxResults(int max_results) -
updateReadUnread
-
isAutoDownloadSupported
protected boolean isAutoDownloadSupported() -
setFatalError
-
setLastError
-
getLastError
- Specified by:
getLastError
in interfaceSubscriptionHistory
-
getLastErrorTime
public long getLastErrorTime()- Specified by:
getLastErrorTime
in interfaceSubscriptionHistory
-
isAuthFail
public boolean isAuthFail()- Specified by:
isAuthFail
in interfaceSubscriptionHistory
-
getConsecFails
public int getConsecFails()- Specified by:
getConsecFails
in interfaceSubscriptionHistory
-
getDownloadWithReferer
public boolean getDownloadWithReferer()- Specified by:
getDownloadWithReferer
in interfaceSubscriptionHistory
-
setDownloadWithReferer
public void setDownloadWithReferer(boolean b) - Specified by:
setDownloadWithReferer
in interfaceSubscriptionHistory
-
loadConfig
protected void loadConfig() -
saveConfig
protected void saveConfig(int reason) -
log
-
log
-
getString
-