Class TagPropertyConstraintHandler
java.lang.Object
com.biglybt.core.tag.impl.TagPropertyConstraintHandler
- All Implemented Interfaces:
TagTypeListener, DownloadListener
public class TagPropertyConstraintHandler
extends Object
implements TagTypeListener, DownloadListener
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface TagTypeListener
TagTypeListener.TagEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static int(package private) final Map<Tag, Map<DownloadManager, Long>> private static final Patternprivate static final Patternprivate static Patternprivate static Patternprivate static final String(package private) final Map<Tag, TagPropertyConstraintHandler.TagConstraint> private final Coreprivate final AsyncDispatcherprivate static final Objectprivate static final Objectprivate static final Objectprivate static final Objectprivate static final Objectprivate static final Objectprivate DownloadManagerListenerprivate booleanprivate static final Objectprivate static final Objectprivate static final Objectprivate static final Objectprivate static final Objectprivate static final Objectprivate static final Stringprivate static final Stringprivate final FrequencyLimitedDispatcher(package private) final IdentityHashMap<DownloadManager, Set<TagPropertyConstraintHandler.TagConstraint>> private booleanprivate booleanprivate static IpFilterprivate static Objectprivate static intprivate final ShareManagerprivate booleanprivate Stringprivate final TagManagerImplprivate static intprivate TimerEventPeriodic -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTagPropertyConstraintHandler(Core _core, TagManagerImpl _tm) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapply(DownloadManager dm, Tag related_tag, boolean auto, boolean is_new) private voidapply(TagPropertyConstraintHandler.TagConstraint constraint) private voidapply(List<DownloadManager> dms, boolean initial_assignment) private voidprivate booleanapplyAll()private static booleancanProcess(TagPropertyConstraintHandler.TagConstraint constraint, DownloadManager dm, boolean is_new) private static booleancanProcess(TagPropertyConstraintHandler.TagConstraint constraint, List<DownloadManager> dms) private voidprivate voidprivate voidprivate voidcompileConstraint(String expr) protected String[]getDependsOnTags(Tag tag) protected StringgetTagStatus(Tag tag) private voidhandleProperty(TagFeatureProperties.TagProperty property, boolean force) private booleanvoidvoidpositionChanged(Download download, int oldPosition, int newPosition) Position of download has changed.voidsetProcessingEnabled(boolean enabled) voidstateChanged(Download download, int old_state, int new_state) The Download's state has changed.voidvoidvoidtagRemoved(Tag tag) voidtagTypeChanged(TagType tag_type) General change not specific to one tag
-
Field Details
-
DM_LISTENERS_ADDED
-
DM_FILE_NAMES
-
DM_FILE_NAMES_SELECTED
-
DM_FILE_EXTS
-
DM_FILE_EXTS_SELECTED
-
DM_FILE_PATHS
-
DM_FILE_PATHS_SELECTED
-
DM_NAME
-
DM_SAVE_PATH
-
DM_PEER_SETS
-
DM_RATES
-
DM_TRACKERS
-
EVAL_CTX_COLOURS
- See Also:
-
EVAL_CTX_TAG_SORT
- See Also:
-
core
-
tag_manager
-
COMMENT_PATTERN1
-
COMMENT_PATTERN2
-
initialised
private volatile boolean initialised -
initial_assignment_complete
private boolean initial_assignment_complete -
stopping
private boolean stopping -
ta_rating_name
-
constrained_tags
-
dm_listener_added
private boolean dm_listener_added -
apply_history
-
dispatcher
-
freq_lim_dispatcher
-
freq_lim_pending
final IdentityHashMap<DownloadManager, Set<TagPropertyConstraintHandler.TagConstraint>> freq_lim_pending -
dm_listener
-
dms_listener
-
ip_filter
-
apply_all_secs
private static volatile int apply_all_secs -
timer
-
process_lock
-
processing_disabled_count
private static int processing_disabled_count -
processing_queue
-
comp_op_pattern
-
comp_ift_pattern
-
comp_op_map
-
config_value_cache
-
config_key_map
-
CONFIG_FLOAT
- See Also:
-
-
Constructor Details
-
TagPropertyConstraintHandler
-
-
Method Details
-
checkRecompiles
private void checkRecompiles() -
setProcessingEnabled
public void setProcessingEnabled(boolean enabled) -
canProcess
private static boolean canProcess(TagPropertyConstraintHandler.TagConstraint constraint, DownloadManager dm, boolean is_new) -
canProcess
private static boolean canProcess(TagPropertyConstraintHandler.TagConstraint constraint, List<DownloadManager> dms) -
checkDMListeners
-
tagTypeChanged
Description copied from interface:TagTypeListenerGeneral change not specific to one tag- Specified by:
tagTypeChangedin interfaceTagTypeListener
-
tagEventOccurred
- Specified by:
tagEventOccurredin interfaceTagTypeListener
-
tagAdded
-
checkTimer
private void checkTimer() -
checkFreqLimUpdates
private void checkFreqLimUpdates() -
nameEtcChanged
-
stateChanged
Description copied from interface:DownloadListenerThe Download's state has changed. This is also triggered if the user toggles the Force Start on/off.- Specified by:
stateChangedin interfaceDownloadListener
-
positionChanged
Description copied from interface:DownloadListenerPosition of download has changed.- Specified by:
positionChangedin interfaceDownloadListener- Parameters:
download- object in which the position has changedoldPosition- position that the download used to be atnewPosition- position that the download is now at
-
getTagStatus
-
explain
-
getDependsOnTags
-
tagRemoved
-
isStopping
private boolean isStopping() -
handleProperty
-
apply
-
apply
-
apply
-
apply
private void apply(List<DownloadManager> dms, List<TagPropertyConstraintHandler.TagConstraint> cons) -
applyAll
private boolean applyAll() -
compileConstraint
-