Interface IThrottleGroups
-
- All Known Implementing Classes:
ThrottleGroups
public interface IThrottleGroupsAn IThrottleGroups object is thread-local and creates a virtual pool of connections to resources whose access needs to be throttled in number, rate of use, and byte rate.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsid
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateOrUpdateThrottleGroup(java.lang.String throttleGroupType, java.lang.String throttleGroup, IThrottleSpec throttleSpec)Create or update a throttle group.voiddestroy()Shut down throttler permanently.voidfreeUnusedResources()Free all unused resources.java.util.Set<java.lang.String>getThrottleGroups(java.lang.String throttleGroupType)Get all existing throttle groups for a throttle group type.IConnectionThrottlerobtainConnectionThrottler(java.lang.String throttleGroupType, java.lang.String throttleGroup, java.lang.String[] binNames)Construct connection throttler for connections with specific bin names.voidpoll()Poll periodically, to update ALL cluster-wide statistics and allocation.voidpoll(java.lang.String throttleGroupType)Poll periodically, to update cluster-wide statistics and allocation.voidremoveThrottleGroup(java.lang.String throttleGroupType, java.lang.String throttleGroup)Remove a throttle group.
-
-
-
Field Detail
-
_rcsid
static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
-
Method Detail
-
getThrottleGroups
java.util.Set<java.lang.String> getThrottleGroups(java.lang.String throttleGroupType) throws ManifoldCFExceptionGet all existing throttle groups for a throttle group type. The throttle group type typically describes a connector class, while the throttle group represents a namespace of bin names specific to that connector class.- Parameters:
throttleGroupType- is the throttle group type.- Returns:
- the set of throttle groups for that group type.
- Throws:
ManifoldCFException
-
removeThrottleGroup
void removeThrottleGroup(java.lang.String throttleGroupType, java.lang.String throttleGroup) throws ManifoldCFExceptionRemove a throttle group.- Parameters:
throttleGroupType- is the throttle group type.throttleGroup- is the throttle group.- Throws:
ManifoldCFException
-
createOrUpdateThrottleGroup
void createOrUpdateThrottleGroup(java.lang.String throttleGroupType, java.lang.String throttleGroup, IThrottleSpec throttleSpec) throws ManifoldCFExceptionCreate or update a throttle group.- Parameters:
throttleGroupType- is the throttle group type.throttleGroup- is the throttle group.throttleSpec- is the desired throttle specification object.- Throws:
ManifoldCFException
-
obtainConnectionThrottler
IConnectionThrottler obtainConnectionThrottler(java.lang.String throttleGroupType, java.lang.String throttleGroup, java.lang.String[] binNames) throws ManifoldCFException
Construct connection throttler for connections with specific bin names. This object is meant to be embedded with a connection pool of similar objects, and used to gate the creation of new connections in that pool.- Parameters:
throttleGroupType- is the throttle group type.throttleGroup- is the throttle group.binNames- are the connection type bin names.- Returns:
- the connection throttling object, or null if the pool is being shut down.
- Throws:
ManifoldCFException
-
poll
void poll(java.lang.String throttleGroupType) throws ManifoldCFException
Poll periodically, to update cluster-wide statistics and allocation.- Parameters:
throttleGroupType- is the throttle group type to update.- Throws:
ManifoldCFException
-
poll
void poll() throws ManifoldCFException
Poll periodically, to update ALL cluster-wide statistics and allocation.- Throws:
ManifoldCFException
-
freeUnusedResources
void freeUnusedResources() throws ManifoldCFExceptionFree all unused resources.- Throws:
ManifoldCFException
-
destroy
void destroy() throws ManifoldCFExceptionShut down throttler permanently.- Throws:
ManifoldCFException
-
-