public class Throttler
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Throttler.ConnectionThrottler
Connection throttler implementation class.
|
protected static class |
Throttler.FetchThrottler
Fetch throttler implementation class.
|
protected static class |
Throttler.StreamThrottler
Stream throttler implementation class.
|
protected class |
Throttler.ThrottlingGroup
This class represents a throttling group, of a specific throttling group type.
|
protected class |
Throttler.ThrottlingGroups
This class represents a throttling group pool
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
protected java.util.Map<java.lang.String,Throttler.ThrottlingGroups> |
throttleGroupsHash
Throttle group hash table.
|
Constructor and Description |
---|
Throttler()
Create a throttler instance.
|
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
buildThrottlingGroupName(java.lang.String throttlingGroupType,
java.lang.String throttlingGroupName) |
void |
createOrUpdateThrottleGroup(IThreadContext threadContext,
java.lang.String throttleGroupType,
java.lang.String throttleGroup,
IThrottleSpec throttleSpec)
Set or update throttle specification for a throttle group.
|
void |
destroy(IThreadContext threadContext)
Shut down all throttlers and deregister them.
|
void |
freeUnusedResources(IThreadContext threadContext)
Free unused resources.
|
java.util.Set<java.lang.String> |
getThrottleGroups(IThreadContext threadContext,
java.lang.String throttleGroupType)
Get all existing throttle groups for a throttle group type.
|
IConnectionThrottler |
obtainConnectionThrottler(IThreadContext threadContext,
java.lang.String throttleGroupType,
java.lang.String throttleGroup,
java.lang.String[] binNames)
Construct connection throttler for connections with specific bin names.
|
void |
poll(IThreadContext threadContext)
Poll ALL bins periodically.
|
void |
poll(IThreadContext threadContext,
java.lang.String throttleGroupType)
Poll periodically.
|
void |
removeThrottleGroup(IThreadContext threadContext,
java.lang.String throttleGroupType,
java.lang.String throttleGroup)
Remove a throttle group.
|
public static final java.lang.String _rcsid
protected final java.util.Map<java.lang.String,Throttler.ThrottlingGroups> throttleGroupsHash
public Throttler()
public java.util.Set<java.lang.String> getThrottleGroups(IThreadContext threadContext, java.lang.String throttleGroupType) throws ManifoldCFException
throttleGroupType
- is the throttle group type.ManifoldCFException
public void removeThrottleGroup(IThreadContext threadContext, java.lang.String throttleGroupType, java.lang.String throttleGroup) throws ManifoldCFException
throttleGroupType
- is the throttle group type.throttleGroup
- is the throttle group.ManifoldCFException
public void createOrUpdateThrottleGroup(IThreadContext threadContext, java.lang.String throttleGroupType, java.lang.String throttleGroup, IThrottleSpec throttleSpec) throws ManifoldCFException
throttleGroupType
- is the throttle group type.throttleGroup
- is the throttle group.throttleSpec
- is the desired throttle specification object.ManifoldCFException
public IConnectionThrottler obtainConnectionThrottler(IThreadContext threadContext, java.lang.String throttleGroupType, java.lang.String throttleGroup, java.lang.String[] binNames) throws ManifoldCFException
throttleGroupType
- is the throttle group type.throttleGroup
- is the throttle group.binNames
- are the connection type bin names.ManifoldCFException
public void poll(IThreadContext threadContext, java.lang.String throttleGroupType) throws ManifoldCFException
ManifoldCFException
public void poll(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException
public void freeUnusedResources(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException
public void destroy(IThreadContext threadContext) throws ManifoldCFException
ManifoldCFException
protected static java.lang.String buildThrottlingGroupName(java.lang.String throttlingGroupType, java.lang.String throttlingGroupName)