Class SpeedLimitHandler.PeerSet.TagPeerImpl
java.lang.Object
com.biglybt.core.tag.impl.TagBase
com.biglybt.core.speedmanager.SpeedLimitHandler.PeerSet.TagPeerImpl
- All Implemented Interfaces:
Tag, TagFeature, TagFeatureExecOnAssign, TagFeatureRateLimit, TagPeer, DataSourceResolver.ExportableDataSource, SimpleTimer.TimerTickReceiver, Tag
- Enclosing class:
SpeedLimitHandler.PeerSet
private class SpeedLimitHandler.PeerSet.TagPeerImpl
extends TagBase
implements TagPeer, TagFeatureExecOnAssign
-
Nested Class Summary
Nested classes/interfaces inherited from interface TagFeatureExecOnAssign
TagFeatureExecOnAssign.OptionsTemplateHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Objectprivate final SpeedLimitHandler.PeerSetprivate intprivate final ObjectFields 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 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 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, ACTIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidadd(PeerManager peer_manager, Peer _peer) voidprivate intprivate intprivate intcanAddClient(PEPeer peer, Pattern client_pattern) private intcanAddIntf(PEPeer peer, Pattern intf_pattern) private booleandeferEOS()private voiddeferredRemove(PEPeer peer) booleanintintintintintintprotected long[]protected long[]intintbooleanprivate voidremove(PeerManager peer_manager, Peer _peer) private voidvoidvoidvoidsetActionEnabled(int action, boolean enabled) private voidvoidsetColor(int[] rgb) voidsetTagBoost(boolean boost) voidsetTagDownloadLimit(int bps) voidsetTagUploadLimit(int bps) voidsetTagUploadPriority(int priority) booleanbooleanbooleanprivate voidupdate(int tick_count) Methods inherited from class TagBase
addListener, addTag, addTaggableBatch, addTagListener, applySort, canBePublic, checkMaximumTaggables, closing, createTagProperty, destroy, exportDataSource, generate, getActionScript, getAutoApplySortInterval, getColor, getColors, 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, 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, getTagName, getTagNameRaw, getTagRemoves, getTagSessionDownloadTotal, getTagSessionUploadTotal, getTagType, getTagUID, getTagUploadTotal, getTransientProperty, getVisibleDefault, getVuzeFile, getWeight, initialized, isActionEnabled, isAnyActionEnabled, isColorDefault, isPublic, isTagAuto, isTagRemoved, isTagRSSFeedEnabled, isVisible, readBooleanAttribute, readLongAttribute, readLongListAttribute, readMapAttribute, readStringAttribute, readStringListAttribute, removeListener, removeTagListener, requestAttention, resetTagSessionDownloadTotal, resetTagSessionUploadTotal, setActionScript, setAutoApplySortInterval, setCanBePublic, setColors, setDescription, setFirstPrioritySeeding, setFlag, setGroup, setImageFile, setImageID, setImageSortOrder, setMaxActiveDownloads, setMaxActiveSeeds, setMaximumTaggables, setNotFirstPrioritySeeding, setNotifyMessageChannel, setOrdering, setPostingNotifications, setPostMessageChannel, setPreventDelete, setPublic, setRecentHistoryRetention, setRemovalStrategy, setStrictActivityLimits, setTagAssigns, 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, getFlag, getGroup, getGroupContainer, getImageFile, getImageID, getImageSortOrder, getStatus, getTaggableAddedTime, getTagID, getTagName, getTagType, getTagUID, getTransientProperty, getVuzeFile, isColorDefault, isHiddenWhenEmpty, isPublic, isTagAuto, isTagRemoved, isVisible, removeTagListener, requestAttention, setCanBePublic, setColors, setDescription, setFlag, setGroup, setHiddenWhenEmpty, setImageFile, setImageID, setImageSortOrder, setPublic, setTagName, setTransientProperty, setVisibleMethods inherited from interface Tag
addListener, getTaggables, getTagName, removeListenerMethods inherited from interface TagFeature
getTagMethods inherited from interface TagFeatureExecOnAssign
getActionScript, getEOAString, getOptionsTemplateHandler, getPostMessageChannel, getTagAssigns, getTagRemoves, isActionEnabled, isAnyActionEnabled, setActionScript, setPostMessageChannel, setTagAssigns, setTagRemoves, supportsActionMethods 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, setTagMaxAggregateShareRatio, setTagMaxAggregateShareRatioAction, setTagMaxAggregateShareRatioHasPriority, setTagMaxShareRatio, setTagMaxShareRatioAction, setTagMinShareRatio
-
Field Details
-
ip_set
-
UPLOAD_PRIORITY_ADDED_KEY
-
BOOSTED_KEY
-
upload_priority
private int upload_priority -
added_peers
-
pending_peers
-
-
Constructor Details
-
TagPeerImpl
-
-
Method Details
-
getTaggableTypes
public int getTaggableTypes()- Specified by:
getTaggableTypesin interfaceTag
-
getSupportedActions
public int getSupportedActions()- Specified by:
getSupportedActionsin interfaceTagFeatureExecOnAssign- Overrides:
getSupportedActionsin classTagBase
-
setActionEnabled
public void setActionEnabled(int action, boolean enabled) - Specified by:
setActionEnabledin interfaceTagFeatureExecOnAssign- Overrides:
setActionEnabledin classTagBase
-
setColor
-
update
private void update(int tick_count) -
deferEOS
private boolean deferEOS() -
deferredRemove
-
canAdd
- Parameters:
peer-- Returns:
- 0=defer, 1=yes, 2=no, 3=remove
-
canAddClient
-
canAddIntf
-
canAddASN
-
add
-
remove
-
removeAll
private void removeAll() -
addTaggable
- Specified by:
addTaggablein interfaceTag- Overrides:
addTaggablein classTagBase
-
removeTaggable
- Specified by:
removeTaggablein interfaceTag- Overrides:
removeTaggablein classTagBase
-
getTaggedCount
public int getTaggedCount()- Specified by:
getTaggedCountin interfaceTag
-
getTaggedPeers
- Specified by:
getTaggedPeersin interfaceTagPeer
-
getTagged
-
hasTaggable
- Specified by:
hasTaggablein interfaceTag
-
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
-
getTagSessionUploadTotalCurrent
protected long[] getTagSessionUploadTotalCurrent()- Overrides:
getTagSessionUploadTotalCurrentin classTagBase
-
getTagSessionDownloadTotalCurrent
protected long[] getTagSessionDownloadTotalCurrent()- Overrides:
getTagSessionDownloadTotalCurrentin classTagBase
-
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
-
getCanBePublicDefault
public boolean getCanBePublicDefault()- Overrides:
getCanBePublicDefaultin classTagBase
-
getTagUploadPriority
public int getTagUploadPriority()- Specified by:
getTagUploadPriorityin interfaceTagFeatureRateLimit
-
setTagUploadPriority
public void setTagUploadPriority(int priority) - Specified by:
setTagUploadPriorityin interfaceTagFeatureRateLimit
-
setTagBoost
public void setTagBoost(boolean boost) - Specified by:
setTagBoostin interfaceTagFeatureRateLimit- Overrides:
setTagBoostin classTagBase
-
setBoost
-
removeTag
-
getDescription
- Specified by:
getDescriptionin interfaceTag- Overrides:
getDescriptionin classTagBase
-