| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentHashMap | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | UnlimitedConcurrentCache(int
the initial capacity initialCapacity)Constructs a cache with unlimited size and set its initial capacity |
| public | UnlimitedConcurrentCache(Map<? extends K, ? extends V>
the map to initialize the cache m)Constructs a cache and initialize the cache with the specified map |
| Modifier and Type | Method and Description |
|---|---|
| public void | cleanUpNullReferences()
Implements org. |
| public Map | Returns: returns the content of the cleared mapImplements org. |
| public boolean | Returns: true if the cache contains a mapping for the specified keykey whose presence in this cache is to be tested. key)Implements org. |
| public boolean | containsValue(Object
value whose presence in this map is to be tested value)Implements java. true if this map maps one or more keys to the
specified value.
|
| public Set | entrySet()
Implements java. Set view of the mappings contained in this map.
|
| public V | Returns: the value, or null, if it does not exist.the key whose associated value is to be returned key)Implements org. |
| public V | Returns: the cached valueprovide the value if the associated value not found valueProviderOverrides default org. |
| public boolean | |
| public Set | Returns: all keysImplements org. |
| public Set | |
| public V | Returns: null, or the old value if the key associated with the specified key.key with which the specified value is to be associated key, V value to be associated with the specified key value)Implements org. |
| public void | putAll(Map<? extends K, ? extends V>
mappings to be stored in this map m)Implements java. |
| public V | Returns: returns the removed valueImplements org. |
| public int | Returns: the size of the cacheImplements org. |
| public Collection | Returns: all cached valuesImplements org. |
| map | back to summary |
|---|---|
| private final ConcurrentHashMap<K, V> map | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| UnlimitedConcurrentCache | back to summary |
|---|---|
| public UnlimitedConcurrentCache() Constructs a cache with unlimited size | |
| UnlimitedConcurrentCache | back to summary |
|---|---|
| public UnlimitedConcurrentCache(int initialCapacity) Constructs a cache with unlimited size and set its initial capacity
| |
| UnlimitedConcurrentCache | back to summary |
|---|---|
| public UnlimitedConcurrentCache(Map<? extends K, ? extends V> m) Constructs a cache and initialize the cache with the specified map
| |
| cleanUpNullReferences | back to summary |
|---|---|
| public void cleanUpNullReferences() Implements org. Replying on the ConcurrentHashMap thread-safe iteration implementation the method will remove all entries holding SoftReferences to gc-evicted objects.
| |
| clearAll | back to summary |
|---|---|
| public Map Implements org. Clear the cache | |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object key) Implements org. Determines if the cache contains an entry for the specified key. | |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object value) Implements java. Doc from java. Returns | |
| entrySet | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns a | |
| get | back to summary |
|---|---|
| public V get(Object key) Implements org. Gets a value from the cache | |
| getAndPut | back to summary |
|---|---|
| public V getAndPut(K key, MemoizeCache. Overrides default org. Try to get the value from cache.
If not found, create the value by
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements java. Doc from java. Returns
| |
| keys | back to summary |
|---|---|
| public Set Implements org. Get all keys associated to cached values | |
| keySet | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns a | |
| put | back to summary |
|---|---|
| public V put(K key, V value) Implements org. Associates the specified value with the specified key in the cache.
| |
| putAll | back to summary |
|---|---|
| public void putAll(Map<? extends K, ? extends V> m) Implements java. Doc from java. Copies all of the mappings from the specified map to this map
(optional operation). The effect of this call is equivalent to that
of calling | |
| remove | back to summary |
|---|---|
| public V remove(Object key) Implements org. Remove the cached value by the key
| |
| size | back to summary |
|---|---|
| public int size() Implements org. Get the size of the cache
| |
| values | back to summary |
|---|---|
| public Collection Implements org. Get all cached values
| |