org.mashupbots.socko.infrastructure
Number of items to store. Items in the cache are evicted after this capacity is reached. Defaults to 1000 items.
Number of threads that can concurrently modify the cache. Using a significantly higher or lower value than needed can waste space or lead to thread contention, but an estimate within an order of magnitude of the ideal value does not usually have a noticeable impact. Because placement in hash tables is essentially random, the actual concurrency will vary. Defaults to 16.
Number of items to store.
Number of items to store. Items in the cache are evicted after this capacity is reached. Defaults to 1000 items.
Number of threads that can concurrently modify the cache.
Number of threads that can concurrently modify the cache. Using a significantly higher or lower value than needed can waste space or lead to thread contention, but an estimate within an order of magnitude of the ideal value does not usually have a noticeable impact. Because placement in hash tables is essentially random, the actual concurrency will vary. Defaults to 16.
Retrieves the value associated with the specified key
Retrieves the value associated with the specified key
Key used in set
The value associated with the key. None
if key not present in the cache.
Removes the value identified by the key from the cache
Removes the value identified by the key from the cache
Unique identifier for the value
Puts a value in the cache
Puts a value in the cache
Unique identifier for the value
Value to cache
After this number of milliseconds, item will be evicted. If 0
(default), item will stay in
the cache indefinitely until the cache's capacity is reached.
Local in-memory cache based on Google's ConcurrentLinkedHashMap.