Package com.biglybt.core.tag.impl
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 com.biglybt.core.tag.TagTypeListener
TagTypeListener.TagEvent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static int
(package private) final Map
<Tag, Map<DownloadManager, Long>> private static final Pattern
private static final Pattern
private static Pattern
private static Pattern
private static final String
(package private) final Map
<Tag, TagPropertyConstraintHandler.TagConstraint> private final Core
private final AsyncDispatcher
private static final Object
private static final Object
private static final Object
private static final Object
private static final Object
private static final Object
private DownloadManagerListener
private boolean
private static final Object
private static final Object
private static final Object
private static final Object
private static final Object
private static final Object
private static final String
private static final String
private final FrequencyLimitedDispatcher
(package private) final IdentityHashMap
<DownloadManager, Set<TagPropertyConstraintHandler.TagConstraint>> private boolean
private boolean
private static IpFilter
private static Object
private static int
private final ShareManager
private boolean
private String
private final TagManagerImpl
private static int
private TimerEventPeriodic
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TagPropertyConstraintHandler
(Core _core, TagManagerImpl _tm) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
apply
(DownloadManager dm, Tag related_tag, boolean auto, boolean is_new) private void
apply
(TagPropertyConstraintHandler.TagConstraint constraint) private void
apply
(List<DownloadManager> dms, boolean initial_assignment) private void
private boolean
applyAll()
private static boolean
canProcess
(TagPropertyConstraintHandler.TagConstraint constraint, DownloadManager dm, boolean is_new) private static boolean
canProcess
(TagPropertyConstraintHandler.TagConstraint constraint, List<DownloadManager> dms) private void
private void
private void
private void
compileConstraint
(String expr) protected String[]
getDependsOnTags
(Tag tag) protected String
getTagStatus
(Tag tag) private void
handleProperty
(TagFeatureProperties.TagProperty property, boolean force) private boolean
void
void
positionChanged
(Download download, int oldPosition, int newPosition) Position of download has changed.void
setProcessingEnabled
(boolean enabled) void
stateChanged
(Download download, int old_state, int new_state) The Download's state has changed.void
void
void
tagRemoved
(Tag tag) void
tagTypeChanged
(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:TagTypeListener
General change not specific to one tag- Specified by:
tagTypeChanged
in interfaceTagTypeListener
-
tagEventOccurred
- Specified by:
tagEventOccurred
in interfaceTagTypeListener
-
tagAdded
-
checkTimer
private void checkTimer() -
checkFreqLimUpdates
private void checkFreqLimUpdates() -
nameEtcChanged
-
stateChanged
Description copied from interface:DownloadListener
The Download's state has changed. This is also triggered if the user toggles the Force Start on/off.- Specified by:
stateChanged
in interfaceDownloadListener
-
positionChanged
Description copied from interface:DownloadListener
Position of download has changed.- Specified by:
positionChanged
in 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
-