public class SoftReferenceMapRetryContextCache extends Object implements RetryContextCache
RetryContextCache. The map backing the
 cache of contexts is synchronized and its entries are soft-referenced, so may
 be garbage collected under pressure.for non-soft referenced version| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULT_CAPACITYDefault value for maximum capacity of the cache. | 
| Constructor and Description | 
|---|
| SoftReferenceMapRetryContextCache()Create a  SoftReferenceMapRetryContextCachewith default capacity. | 
| SoftReferenceMapRetryContextCache(int defaultCapacity) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | containsKey(Object key) | 
| RetryContext | get(Object key) | 
| void | put(Object key,
   RetryContext context) | 
| void | remove(Object key) | 
| void | setCapacity(int capacity)Public setter for the capacity. | 
public static final int DEFAULT_CAPACITY
public SoftReferenceMapRetryContextCache()
SoftReferenceMapRetryContextCache with default capacity.public SoftReferenceMapRetryContextCache(int defaultCapacity)
defaultCapacity - the default capacitypublic void setCapacity(int capacity)
capacity - the capacity to setpublic boolean containsKey(Object key)
containsKey in interface RetryContextCachepublic RetryContext get(Object key)
get in interface RetryContextCachepublic void put(Object key, RetryContext context)
put in interface RetryContextCachepublic void remove(Object key)
remove in interface RetryContextCacheCopyright © 2018 SpringSource. All rights reserved.