Interface IThrottleGroups
-
- All Known Implementing Classes:
ThrottleGroups
public interface IThrottleGroups
An 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 void
createOrUpdateThrottleGroup(java.lang.String throttleGroupType, java.lang.String throttleGroup, IThrottleSpec throttleSpec)
Create or update a throttle group.void
destroy()
Shut down throttler permanently.void
freeUnusedResources()
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.IConnectionThrottler
obtainConnectionThrottler(java.lang.String throttleGroupType, java.lang.String throttleGroup, java.lang.String[] binNames)
Construct connection throttler for connections with specific bin names.void
poll()
Poll periodically, to update ALL cluster-wide statistics and allocation.void
poll(java.lang.String throttleGroupType)
Poll periodically, to update cluster-wide statistics and allocation.void
removeThrottleGroup(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 ManifoldCFException
Get 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 ManifoldCFException
Remove 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 ManifoldCFException
Create 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 ManifoldCFException
Free all unused resources.- Throws:
ManifoldCFException
-
destroy
void destroy() throws ManifoldCFException
Shut down throttler permanently.- Throws:
ManifoldCFException
-
-