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 voidaddCallerContext(String id, CallerContext callerContext)voidaddThrottleContext(String applicationId, ThrottleContext applicationThrottleContext)CallerContextgetCallerContext(String id)ConcurrentAccessControllergetConcurrentAccessController(String key)ThrottleContextgetThrottleContext(String applicationId)voidremoveCaller(String id)voidremoveConcurrentAccessController(String key)voidsetConcurrentAccessController(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)
-
-