Class ThrottleDataHolder
- java.lang.Object
-
- org.apache.synapse.commons.throttle.core.ThrottleDataHolder
-
public class ThrottleDataHolder extends Object
This class is used to keep frequently changing Throttle data. Earlier ConfigurationContext was used to keep this data but when properties in the CC are modified concurrently, it makes the HashMap to corrupt, leading certain threads to read entries indefinitely.
-
-
Constructor Summary
Constructors Constructor Description ThrottleDataHolder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCallerContext(String id, CallerContext callerContext)
void
addThrottleContext(String applicationId, ThrottleContext applicationThrottleContext)
CallerContext
getCallerContext(String id)
ConcurrentAccessController
getConcurrentAccessController(String key)
ThrottleContext
getThrottleContext(String applicationId)
void
removeCaller(String id)
void
removeConcurrentAccessController(String key)
void
setConcurrentAccessController(String key, ConcurrentAccessController concurrentAccessController)
-
-
-
Method Detail
-
getConcurrentAccessController
public ConcurrentAccessController getConcurrentAccessController(String key)
-
setConcurrentAccessController
public void setConcurrentAccessController(String key, ConcurrentAccessController concurrentAccessController)
-
removeConcurrentAccessController
public void removeConcurrentAccessController(String key)
-
getThrottleContext
public ThrottleContext getThrottleContext(String applicationId)
-
addThrottleContext
public void addThrottleContext(String applicationId, ThrottleContext applicationThrottleContext)
-
addCallerContext
public void addCallerContext(String id, CallerContext callerContext)
-
getCallerContext
public CallerContext getCallerContext(String id)
-
removeCaller
public void removeCaller(String id)
-
-