Class CategoryImpl
java.lang.Object
com.biglybt.core.tag.impl.TagBase
com.biglybt.core.category.impl.CategoryImpl
- All Implemented Interfaces:
Category, Tag, TagDownload, TagFeature, TagFeatureExecOnAssign, TagFeatureFileLocation, TagFeatureLimits, TagFeatureNotifications, TagFeatureProperties, TagFeatureRateLimit, TagFeatureRSSFeed, TagFeatureRunState, TagFeatureTranscode, TagListener, DataSourceResolver.ExportableDataSource, SimpleTimer.TimerTickReceiver, Tag, Comparable
-
Nested Class Summary
Nested classes/interfaces inherited from interface TagFeatureExecOnAssign
TagFeatureExecOnAssign.OptionsTemplateHandlerNested classes/interfaces inherited from interface TagFeatureProperties
TagFeatureProperties.TagProperty, TagFeatureProperties.TagPropertyListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ListenerManager<CategoryListener> private booleanprivate final LimitedRateGroup(package private) intprivate static final intprivate static final intprivate final CopyOnWriteList<DownloadManager> private final IdentityHashSet<DownloadManager> (package private) final Stringprivate static final AtomicIntegerprivate final intprivate final LimitedRateGroupprivate final Object(package private) intFields inherited from class TagBase
AT_AUTO_APPLY_SORT_INTERVAL, AT_BYTES_DOWN, AT_BYTES_UP, AT_CAN_BE_PUBLIC, AT_COLOR_ID, AT_COLORS_ID, AT_DESCRIPTION, AT_EOS_ASSIGN_TAGS, AT_EOS_OPTIONS_TEMPLATE, AT_EOS_PM, AT_EOS_REMOVE_TAGS, AT_EOS_SCRIPT, AT_FL_COPY_COMP, AT_FL_COPY_COMP_OPT, AT_FL_INIT_LOC, AT_FL_INIT_LOC_OPT, AT_FL_MOVE_ASSIGN, AT_FL_MOVE_ASSIGN_OPT, AT_FL_MOVE_COMP, AT_FL_MOVE_COMP_OPT, AT_FL_MOVE_REM, AT_FL_MOVE_REM_OPT, AT_FL_PREVENT_DELETE, AT_FLAGS, AT_GROUP, AT_IMAGE_FILE, AT_IMAGE_ID, AT_IMAGE_SORT_ORDER, AT_LIMIT_ORDERING, AT_MAX_TAGGABLES, AT_NOTIFICATION_POST, AT_NOTIFICATION_PUBLISH, AT_ORIGINAL_NAME, AT_PROPERTY_PREFIX, AT_PUBLIC, AT_RATELIMIT_ACTIVE_LIMITS_STRICT, AT_RATELIMIT_BOOST, AT_RATELIMIT_DOWN, AT_RATELIMIT_FP_SEEDING, AT_RATELIMIT_MAX_ACTIVE_CD, AT_RATELIMIT_MAX_ACTIVE_DL, AT_RATELIMIT_MAX_AGGREGATE_SR, AT_RATELIMIT_MAX_AGGREGATE_SR_ACTION, AT_RATELIMIT_MAX_AGGREGATE_SR_PRIORITY, AT_RATELIMIT_MAX_SR, AT_RATELIMIT_MAX_SR_ACTION, AT_RATELIMIT_MIN_SR, AT_RATELIMIT_NOT_FP_SEEDING, AT_RATELIMIT_UP, AT_RATELIMIT_UP_PRI, AT_REMOVAL_STRATEGY, AT_RSS_ENABLE, AT_VISIBLE, AT_WEIGHT, AT_XCODE_TARGETFields inherited from interface Category
AT_AUTO_TRANSCODE_TARGET, AT_RSS_GEN, AT_UPLOAD_PRIORITY, TYPE_ALL, TYPE_UNCATEGORIZED, TYPE_USERFields inherited from interface DataSourceResolver.ExportableDataSource
OPT_CAN_MINIMIZE, OPT_ON_TOPFields inherited from interface Tag
FL_IS_FILTER, FL_IS_HIDDEN_WHEN_EMPTY, FL_NONE, TP_CONSTRAINT_ERROR, TP_SETTINGS_REQUESTEDFields inherited from interface TagDownload
FEATURESFields inherited from interface TagFeature
TF_EXEC_ON_ASSIGN, TF_FILE_LOCATION, TF_LIMITS, TF_NONE, TF_NOTIFICATIONS, TF_PROPERTIES, TF_RATE_LIMIT, TF_RSS_FEED, TF_RUN_STATE, TF_XCODEFields inherited from interface TagFeatureExecOnAssign
ACTION_APPLY_OPTIONS_TEMPLATE, ACTION_ASSIGN_TAGS, ACTION_BAN, ACTION_DESTROY, ACTION_FORCE_START, ACTION_HOST, ACTION_MOVE_INIT_SAVE_LOC, ACTION_NONE, ACTION_NOT_FORCE_START, ACTION_PAUSE, ACTION_POST_MAGNET_URI, ACTION_PUBLISH, ACTION_QUEUE, ACTION_REMOVE_TAGS, ACTION_RESUME, ACTION_SCRIPT, ACTION_START, ACTION_STOP, ACTIONSFields inherited from interface TagFeatureFileLocation
FL_BOTH, FL_DATA, FL_DEFAULT, FL_NONE, FL_TORRENTFields inherited from interface TagFeatureLimits
OP_ADDED_TO_VUZE, OP_ADED_TO_TAG, OP_DEFAULT, RS_ARCHIVE, RS_DEFAULT, RS_DELETE_FROM_COMPUTER, RS_MOVE_TO_OLD_TAG, RS_NONE, RS_REMOVE_FROM_LIBRARYFields inherited from interface TagFeatureNotifications
NOTIFY_NONE, NOTIFY_ON_ADD, NOTIFY_ON_REMOVEFields inherited from interface TagFeatureProperties
PR_CONSTRAINT, PR_TRACKER_TEMPLATES, PR_TRACKERS, PR_UNTAGGED, PT_BOOLEAN, PT_LONG, PT_STRING_LISTFields inherited from interface TagFeatureRateLimit
AT_RATELIMIT_MAX_AGGREGATE_SR_PRIORITY_DEFAULT, SR_ACTION_ARCHIVE, SR_ACTION_PAUSE, SR_ACTION_QUEUE, SR_ACTION_REMOVE_FROM_COMPUTER, SR_ACTION_REMOVE_FROM_LIBRARY, SR_ACTION_STOP, SR_AGGREGATE_ACTION_DEFAULT, SR_INDIVIDUAL_ACTION_DEFAULTFields inherited from interface TagFeatureRunState
RSC_ALL, RSC_ARCHIVE, RSC_FORCE_START, RSC_NONE, RSC_PAUSE, RSC_REMOVE_FROM_COMPUTER, RSC_REMOVE_FROM_LIBRARY, RSC_RESUME, RSC_START, RSC_START_STOP_PAUSE, RSC_STOP, RSC_STOP_PAUSE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCategoryImpl(CategoryManagerImpl manager, String sName, int maxup, int maxdown, Map<String, String> _attributes) protectedCategoryImpl(CategoryManagerImpl manager, String sName, int type, Map<String, String> _attributes) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a Category ListenervoidaddManager(DownloadManagerState manager_state) Add a DownloadManager to this category.voidintprotected voiddestroy()voiddump(IndentWriter writer) booleangetBooleanAttribute(String name) booleangetDownloadManagers(List<DownloadManager> all_dms) Retrieve a list of DownloadManagers for this categoryintintgetIntAttribute(String name) private intgetIntAttribute(String name, int def) getName()Retrieve the name of the category.boolean[]getPerformableOperations(int[] ops) intgetStringAttribute(String name) intintintintintgetTagName(boolean localize) String[]intintintgetType()Retrieves what type of Category this isintbooleanhasRunStateCapability(int capability) booleanboolean[]protected voidperformOperation(int op) voidRemove a Category ListenervoidremoveManager(DownloadManagerState manager_state) Remove a DownloadManager object from this Category.voidvoidprotected voidsetAttributes(Map<String, String> a) voidsetBooleanAttribute(String name, boolean value) voidsetDownloadSpeed(int speed) voidsetIntAttribute(String name, int value) voidsetStringAttribute(String name, String value) voidsetTagDownloadLimit(int bps) voidsetTagTranscodeTarget(String uid, String display_name) voidsetTagUploadLimit(int bps) voidsetTagUploadPriority(int priority) voidsetUploadSpeed(int speed) booleanbooleanbooleanbooleanvoidtaggableAdded(Tag tag, Taggable tagged) voidtaggableRemoved(Tag tag, Taggable tagged) voidtaggableSync(Tag tag) Methods inherited from class TagBase
addListener, addTag, addTaggableBatch, addTagListener, applySort, canBePublic, checkMaximumTaggables, closing, createTagProperty, exportDataSource, generate, getActionScript, getAutoApplySortInterval, getColor, getColors, getDescription, getEOAString, getFirstPrioritySeeding, getFlag, getGroup, getGroupContainer, getImageFile, getImageID, getImageSortOrder, getManager, getMaxActiveDownloads, getMaxActiveSeeds, getMaximumTaggables, getNotFirstPrioritySeeding, getNotifyMessageChannel, getOptionsTemplateHandler, getOrdering, getPostingNotifications, getPostMessageChannel, getPreventDelete, getPropertiesString, getProperty, getPublicDefault, getRecentHistory, getRemovalStrategy, getStrictActivityLimits, getSupportedActions, getSupportedProperties, getTag, getTagAggregateShareRatio, getTagAssigns, getTagBoost, getTagCopyOnCompleteFolder, getTagCopyOnCompleteOptions, getTagDownloadTotal, getTaggableAddedTime, getTaggables, getTagID, getTagInitialSaveFolder, getTagInitialSaveOptions, getTagMaxAggregateShareRatio, getTagMaxAggregateShareRatioAction, getTagMaxAggregateShareRatioHasPriority, getTagMaxShareRatio, getTagMaxShareRatioAction, getTagMinShareRatio, getTagMoveOnAssignFolder, getTagMoveOnAssignOptions, getTagMoveOnCompleteFolder, getTagMoveOnCompleteOptions, getTagMoveOnRemoveFolder, getTagMoveOnRemoveOptions, getTagName, getTagNameRaw, getTagRemoves, getTagSessionDownloadTotal, getTagSessionDownloadTotalCurrent, getTagSessionUploadTotal, getTagSessionUploadTotalCurrent, getTagType, getTagUID, getTagUploadTotal, getTransientProperty, getVisibleDefault, getVuzeFile, getWeight, initialized, isActionEnabled, isAnyActionEnabled, isColorDefault, isPublic, isTagRemoved, isTagRSSFeedEnabled, isVisible, readBooleanAttribute, readLongAttribute, readLongListAttribute, readMapAttribute, readStringAttribute, readStringListAttribute, removeListener, removeTagListener, requestAttention, resetTagSessionDownloadTotal, resetTagSessionUploadTotal, setActionEnabled, setActionScript, setAutoApplySortInterval, setCanBePublic, setColor, setColors, setDescription, setFirstPrioritySeeding, setFlag, setGroup, setImageFile, setImageID, setImageSortOrder, setMaxActiveDownloads, setMaxActiveSeeds, setMaximumTaggables, setNotFirstPrioritySeeding, setNotifyMessageChannel, setOrdering, setPostingNotifications, setPostMessageChannel, setPreventDelete, setPublic, setRecentHistoryRetention, setRemovalStrategy, setStrictActivityLimits, setTagAssigns, setTagBoost, setTagCopyOnCompleteFolder, setTagCopyOnCompleteOptions, setTagInitialSaveFolder, setTagInitialSaveOptions, setTagMaxAggregateShareRatio, setTagMaxAggregateShareRatioAction, setTagMaxAggregateShareRatioHasPriority, setTagMaxShareRatio, setTagMaxShareRatioAction, setTagMinShareRatio, setTagMoveOnAssignFolder, setTagMoveOnAssignOptions, setTagMoveOnCompleteFolder, setTagMoveOnCompleteOptions, setTagMoveOnRemoveFolder, setTagMoveOnRemoveOptions, setTagName, setTagRemoves, setTagRSSFeedEnabled, setTransientProperty, setVisible, setWeight, supportsAction, supportsTagCopyOnComplete, supportsTagInitialSaveFolder, supportsTagMoveOnAssign, supportsTagMoveOnComplete, supportsTagMoveOnRemove, sync, tick, writeBooleanAttribute, writeLongAttribute, writeLongListAttribute, writeMapAttribute, writeStringAttribute, writeStringListAttributeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DataSourceResolver.ExportableDataSource
getBooleanOptionMethods inherited from interface Tag
addTaggableBatch, addTagListener, canBePublic, dependsOnTags, getColor, getColors, getDescription, getFlag, getGroup, getGroupContainer, getImageFile, getImageID, getImageSortOrder, getStatus, getTaggableAddedTime, getTagID, getTagType, getTagUID, getTransientProperty, getVuzeFile, isColorDefault, isHiddenWhenEmpty, isPublic, isTagRemoved, isVisible, removeTagListener, requestAttention, setCanBePublic, setColor, setColors, setDescription, setFlag, setGroup, setHiddenWhenEmpty, setImageFile, setImageID, setImageSortOrder, setPublic, setTagName, setTransientProperty, setVisibleMethods inherited from interface Tag
addListener, getTaggables, getTagName, removeListenerMethods inherited from interface TagDownload
applySort, getAutoApplySortInterval, getWeight, setAutoApplySortInterval, setWeightMethods inherited from interface TagFeature
getTagMethods inherited from interface TagFeatureExecOnAssign
getActionScript, getEOAString, getOptionsTemplateHandler, getPostMessageChannel, getSupportedActions, getTagAssigns, getTagRemoves, isActionEnabled, isAnyActionEnabled, setActionEnabled, setActionScript, setPostMessageChannel, setTagAssigns, setTagRemoves, supportsActionMethods inherited from interface TagFeatureFileLocation
getPreventDelete, getTagCopyOnCompleteFolder, getTagCopyOnCompleteOptions, getTagInitialSaveFolder, getTagInitialSaveOptions, getTagMoveOnAssignFolder, getTagMoveOnAssignOptions, getTagMoveOnCompleteFolder, getTagMoveOnCompleteOptions, getTagMoveOnRemoveFolder, getTagMoveOnRemoveOptions, setPreventDelete, setTagCopyOnCompleteFolder, setTagCopyOnCompleteOptions, setTagInitialSaveFolder, setTagInitialSaveOptions, setTagMoveOnAssignFolder, setTagMoveOnAssignOptions, setTagMoveOnCompleteFolder, setTagMoveOnCompleteOptions, setTagMoveOnRemoveFolder, setTagMoveOnRemoveOptions, supportsTagCopyOnComplete, supportsTagInitialSaveFolder, supportsTagMoveOnAssign, supportsTagMoveOnComplete, supportsTagMoveOnRemoveMethods inherited from interface TagFeatureLimits
getMaximumTaggables, getOrdering, getRemovalStrategy, setMaximumTaggables, setOrdering, setRemovalStrategyMethods inherited from interface TagFeatureNotifications
getNotifyMessageChannel, getPostingNotifications, setNotifyMessageChannel, setPostingNotificationsMethods inherited from interface TagFeatureProperties
getPropertiesString, getProperty, getSupportedPropertiesMethods inherited from interface TagFeatureRateLimit
getFirstPrioritySeeding, getMaxActiveDownloads, getMaxActiveSeeds, getNotFirstPrioritySeeding, getRecentHistory, getStrictActivityLimits, getTagAggregateShareRatio, getTagBoost, getTagDownloadTotal, getTagMaxAggregateShareRatio, getTagMaxAggregateShareRatioAction, getTagMaxAggregateShareRatioHasPriority, getTagMaxShareRatio, getTagMaxShareRatioAction, getTagMinShareRatio, getTagSessionDownloadTotal, getTagSessionUploadTotal, getTagUploadTotal, resetTagSessionDownloadTotal, resetTagSessionUploadTotal, setFirstPrioritySeeding, setMaxActiveDownloads, setMaxActiveSeeds, setNotFirstPrioritySeeding, setRecentHistoryRetention, setStrictActivityLimits, setTagBoost, setTagMaxAggregateShareRatio, setTagMaxAggregateShareRatioAction, setTagMaxAggregateShareRatioHasPriority, setTagMaxShareRatio, setTagMaxShareRatioAction, setTagMinShareRatioMethods inherited from interface TagFeatureRSSFeed
isTagRSSFeedEnabled, setTagRSSFeedEnabledMethods inherited from interface TagFeatureRunState
getPerformableOperations, performOperation
-
Field Details
-
sName
-
type
private final int type -
managers_cow
-
managers_set
-
upload_speed
int upload_speed -
download_speed
int download_speed -
UPLOAD_PRIORITY_KEY
-
attributes
-
tag_ids
-
upload_limiter
-
download_limiter
-
destroyed
private boolean destroyed -
LDT_CATEGORY_DMADDED
private static final int LDT_CATEGORY_DMADDED- See Also:
-
LDT_CATEGORY_DMREMOVED
private static final int LDT_CATEGORY_DMREMOVED- See Also:
-
category_listeners
-
-
Constructor Details
-
CategoryImpl
protected CategoryImpl(CategoryManagerImpl manager, String sName, int maxup, int maxdown, Map<String, String> _attributes) -
CategoryImpl
protected CategoryImpl(CategoryManagerImpl manager, String sName, int type, Map<String, String> _attributes)
-
-
Method Details
-
localeChanged
protected void localeChanged() -
addCategoryListener
Description copied from interface:CategoryAdd a Category Listener- Specified by:
addCategoryListenerin interfaceCategory- Parameters:
l- Listener to add
-
removeCategoryListener
Description copied from interface:CategoryRemove a Category Listener- Specified by:
removeCategoryListenerin interfaceCategory- Parameters:
l- Listener to remove
-
getName
-
getType
-
isTagAuto
-
getDownloadManagers
Description copied from interface:CategoryRetrieve a list of DownloadManagers for this category- Specified by:
getDownloadManagersin interfaceCategory- Returns:
- DownloadManager List
-
addManager
Description copied from interface:CategoryAdd a DownloadManager to this category. Used by DownloadManager. You should not have to add a DownloadManager object manually. If you wish to change a DownloadManager's category, use DownloadManager.setCategory(..) instead.- Specified by:
addManagerin interfaceCategory- Parameters:
manager_state- DownloadManager object to add to Category
-
removeManager
Description copied from interface:CategoryRemove a DownloadManager object from this Category. Used by DownloadManager. You should not have to add a DownloadManager object manually. If you wish to change a DownloadManager's category, use DownloadManager.setCategory(..) instead.- Specified by:
removeManagerin interfaceCategory- Parameters:
manager_state- DownloadManager object to remove from Category
-
addTaggable
- Specified by:
addTaggablein interfaceTag- Overrides:
addTaggablein classTagBase
-
removeTaggable
- Specified by:
removeTaggablein interfaceTag- Overrides:
removeTaggablein classTagBase
-
taggableAdded
- Specified by:
taggableAddedin interfaceTagListener
-
taggableSync
- Specified by:
taggableSyncin interfaceTagListener
-
taggableRemoved
- Specified by:
taggableRemovedin interfaceTagListener
-
setDownloadSpeed
public void setDownloadSpeed(int speed) - Specified by:
setDownloadSpeedin interfaceCategory
-
getDownloadSpeed
public int getDownloadSpeed()- Specified by:
getDownloadSpeedin interfaceCategory
-
setUploadSpeed
public void setUploadSpeed(int speed) - Specified by:
setUploadSpeedin interfaceCategory
-
getUploadSpeed
public int getUploadSpeed()- Specified by:
getUploadSpeedin interfaceCategory
-
setAttributes
-
getAttributes
-
getStringAttribute
- Specified by:
getStringAttributein interfaceCategory
-
setStringAttribute
- Specified by:
setStringAttributein interfaceCategory
-
getIntAttribute
- Specified by:
getIntAttributein interfaceCategory
-
getIntAttribute
-
setIntAttribute
- Specified by:
setIntAttributein interfaceCategory
-
getBooleanAttribute
- Specified by:
getBooleanAttributein interfaceCategory
-
setBooleanAttribute
- Specified by:
setBooleanAttributein interfaceCategory
-
getTaggableTypes
public int getTaggableTypes()- Specified by:
getTaggableTypesin interfaceTag
-
getTagName
- Specified by:
getTagNamein interfaceTag- Overrides:
getTagNamein classTagBase
-
supportsTagRates
public boolean supportsTagRates()- Specified by:
supportsTagRatesin interfaceTagFeatureRateLimit
-
supportsTagUploadLimit
public boolean supportsTagUploadLimit()- Specified by:
supportsTagUploadLimitin interfaceTagFeatureRateLimit
-
supportsTagDownloadLimit
public boolean supportsTagDownloadLimit()- Specified by:
supportsTagDownloadLimitin interfaceTagFeatureRateLimit
-
getTagUploadLimit
public int getTagUploadLimit()- Specified by:
getTagUploadLimitin interfaceTagFeatureRateLimit- Returns:
- Max Upload Speed in bytes/sec
-
setTagUploadLimit
public void setTagUploadLimit(int bps) - Specified by:
setTagUploadLimitin interfaceTagFeatureRateLimit
-
getTagCurrentUploadRate
public int getTagCurrentUploadRate()- Specified by:
getTagCurrentUploadRatein interfaceTagFeatureRateLimit
-
getTagDownloadLimit
public int getTagDownloadLimit()- Specified by:
getTagDownloadLimitin interfaceTagFeatureRateLimit- Returns:
- Max Download Speed in bytes/sec
-
setTagDownloadLimit
public void setTagDownloadLimit(int bps) - Specified by:
setTagDownloadLimitin interfaceTagFeatureRateLimit
-
getTagCurrentDownloadRate
public int getTagCurrentDownloadRate()- Specified by:
getTagCurrentDownloadRatein interfaceTagFeatureRateLimit
-
getTagUploadPriority
public int getTagUploadPriority()- Specified by:
getTagUploadPriorityin interfaceTagFeatureRateLimit
-
setTagUploadPriority
public void setTagUploadPriority(int priority) - Specified by:
setTagUploadPriorityin interfaceTagFeatureRateLimit
-
getCanBePublicDefault
public boolean getCanBePublicDefault()- Overrides:
getCanBePublicDefaultin classTagBase
-
supportsTagTranscode
public boolean supportsTagTranscode()- Specified by:
supportsTagTranscodein interfaceTagFeatureTranscode
-
getTagTranscodeTarget
- Specified by:
getTagTranscodeTargetin interfaceTagFeatureTranscode
-
setTagTranscodeTarget
- Specified by:
setTagTranscodeTargetin interfaceTagFeatureTranscode
-
getTaggedDownloads
- Specified by:
getTaggedDownloadsin interfaceTagDownload
-
getTagged
-
getTaggedCount
public int getTaggedCount()- Specified by:
getTaggedCountin interfaceTag
-
hasTaggable
- Specified by:
hasTaggablein interfaceTag
-
getRunStateCapabilities
public int getRunStateCapabilities()- Specified by:
getRunStateCapabilitiesin interfaceTagFeatureRunState
-
hasRunStateCapability
public boolean hasRunStateCapability(int capability) - Specified by:
hasRunStateCapabilityin interfaceTagFeatureRunState
-
getPerformableOperations
public boolean[] getPerformableOperations(int[] ops) - Specified by:
getPerformableOperationsin interfaceTagFeatureRunState
-
performOperation
- Specified by:
performOperationin interfaceTagFeatureRunState
-
destroy
-
removeTag
-
compareTo
- Specified by:
compareToin interfaceComparable
-
dump
-