public class Throttle
extends java.lang.Object
| Constructor and Description |
|---|
Throttle()
Default Constructor - initiates the context and configuration maps
|
| Modifier and Type | Method and Description |
|---|---|
void |
addThrottleConfiguration(java.lang.String key,
ThrottleConfiguration throttleConfiguration)
Adds a ThrottleConfiguration with the given key - configuration
holds all static data for registered callers
|
void |
addThrottleContext(java.lang.String key,
ThrottleContext throttleContext)
Adds a ThrotleContext with the given key - context holds all runtime data
for registered callers
|
ConcurrentAccessController |
getConcurrentAccessController()
Returns the ConcurrentAccessController - this will control all the concurrent access
|
java.lang.String |
getId()
Returns the unique identifier for this throttle
|
ThrottleConfiguration |
getThrottleConfiguration(java.lang.String key)
Returns the ThrottleConfiguration for a given key -
configuration holds all static data for registered callers
|
ThrottleContext |
getThrottleContext(java.lang.String contextID)
Returns the ThrotleContext for a given key - context holds all
runtime data for registered callers
|
void |
setConcurrentAccessController(ConcurrentAccessController controller)
Sets the ConcurrentAccessController - this will control all the concurrent access
|
void |
setId(java.lang.String id)
Sets the unique identifier for this throttle
|
public Throttle()
public void addThrottleConfiguration(java.lang.String key,
ThrottleConfiguration throttleConfiguration)
key - - corresponding key for throttle type.This key
has one-one relationship with key of contextsthrottleConfiguration - - holds all static data for a throttle -
ex: all callers configurationspublic void addThrottleContext(java.lang.String key,
ThrottleContext throttleContext)
key - - corresponding key for throttle type.This key has one-one
relationship with key of configurationsthrottleContext - - holds runtime data - ex: all callers statespublic ThrottleContext getThrottleContext(java.lang.String contextID)
contextID - - corresponding key for throttle typepublic ThrottleConfiguration getThrottleConfiguration(java.lang.String key)
key - -corresponding key for throttle typepublic void setConcurrentAccessController(ConcurrentAccessController controller)
controller - - the ConcurrentAccessController instancepublic ConcurrentAccessController getConcurrentAccessController()
public java.lang.String getId()
public void setId(java.lang.String id)
id - String representation of the idCopyright © 2005-2021 Apache Software Foundation. All Rights Reserved.