@ThreadSafe public class TokenStore extends java.lang.ObjectA thread-safe token store that supports concurrent
put(java.lang.String, org.joda.time.DateTime), and
The tokens represent quota allocated to each user, which needs to be leased to the user upon connection and optionally returned to the store upon termination. Failure to acquire tokens results in quota fulfillment failure, leading to automatic connection termination. For details on tokens, see
The store also lazily refills tokens for a
put(java.lang.String, org.joda.time.DateTime)takes place. It also exposes a
refresh()method that goes through each entry in the store and purges stale entries, in order to prevent the token store from growing too large.
There should be one token store for each protocol.