public abstract class AbstractBaseCache extends Object implements Cache, Serializable
Map map = Collections.synchronizedMap(new HashMap(...));
| Constructor and Description |
|---|
AbstractBaseCache()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Map |
createMap()
Creates the map to be used with the cache.
|
protected Map |
getMap()
Protected getter for map attribute to allow concrete classes to access
the map.
|
int |
size()
Returns the number of elements in this cache (its cardinality).
|
protected final Map getMap()
protected abstract Map createMap()
Concrete classes must implement this method and create a concrete map for the cache.
public final int size()
size in interface CacheCache.size()Copyright © 2005–2020. All rights reserved.