|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fjank.jcache.collection.MapAdapter
public class MapAdapter
A Map based implementation of CacheAccess.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
MapAdapter(CacheAccessImpl2 originalAccess)
|
Method Summary | |
---|---|
void |
clear()
|
boolean |
containsKey(Object key)
Returns true if this map contains a mapping for the specified key. |
boolean |
containsValue(Object value)
|
void |
defineObject(Object name,
Attributes attributes)
is used to specify the attributes to associate with an object when it is loaded. |
Set |
entrySet()
|
Object |
get(Object key)
Returns the value to which this map maps the specified key. |
Object |
get(Object name,
Object arguments)
Gets the object from the cache. |
Attributes |
getAttributes()
Will return an attribute object describing the current attributes associated for the region for this CacheAccess. |
Attributes |
getAttributes(Object name)
will return an attribute object describing the current attributes associated with the object name. |
boolean |
isEmpty()
|
Set |
keySet()
|
Object |
put(Object key,
Object value)
|
Object |
put(Object key,
String group,
Object value)
Puts a object into the cache, and attach it to a group. |
void |
putAll(Map t)
Adds all elements in th map into FKache. |
Object |
remove(Object key)
Removes an object from this map. |
Object |
remove(Object key,
String group)
Removes an object from a group. |
int |
size()
Returns the current number of objects (Raw objects and groups) in this region. |
Collection |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public MapAdapter(CacheAccessImpl2 originalAccess)
Method Detail |
---|
public int size()
size
in interface Map
Map.size()
public boolean isEmpty()
isEmpty
in interface Map
public boolean containsKey(Object key)
containsKey
in interface Map
key
- key whose presence in this map is to be tested.
true
if this map contains a mapping for the
specified key.
NullPointerException
- if the key is null.Map.containsKey(java.lang.Object)
public boolean containsValue(Object value)
containsValue
in interface Map
public Object get(Object key)
More formally, if this map contains a mapping from a key k to a value v such that (key.equals(k)), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)
get
in interface Map
key
- key whose associated value is to be returned.
ClassCastException
- if an attempt is mad to retrieve a group.
NullPointerException
- key is null.Map.get(java.lang.Object)
public Object put(Object key, Object value)
put
in interface Map
IllegalArgumentException
- if some aspect of this key or value prevents it from being
stored in this map.javax.util.jcache.CacheAccess#put(java.lang.Object,
java.lang.Object)
,
Map.put(java.lang.Object, java.lang.Object)
public Object put(Object key, String group, Object value)
CacheMap
put
in interface CacheMap
key
- the key of the objectgroup
- the group to put it in to.value
- the actual object to put into the cache.
IllegalArgumentException
- if some aspect of this key, group or value prevents it from
being stored in this map.javax.util.jcache.CacheAccess#put(Object, String, Object)
,
CacheMap.put(Object, String, Object)
public Object remove(Object key)
remove
in interface Map
key
- the object to remove.
Map.remove(java.lang.Object)
public Object remove(Object key, String group)
CacheMap
remove
in interface CacheMap
key
- The object to remove.group
- The group to remove the object from.
public void putAll(Map t)
putAll
in interface Map
t
- the map which contains the elements to add.
IllegalArgumentException
- if some aspect of the map prevents this operation to
complete.
NullPointerException
- if the map is null, a key is null, or any
value is null.Map.putAll(java.util.Map)
public void clear()
clear
in interface Map
public Set keySet()
keySet
in interface Map
public Collection values()
values
in interface Map
public Set entrySet()
entrySet
in interface Map
public Attributes getAttributes()
CacheMap
getAttributes
in interface CacheMap
public Attributes getAttributes(Object name) throws CacheException
CacheMap
getAttributes
in interface CacheMap
name
- the name of the object to get the attributes for.
CacheException
- if an error occurs.public Object get(Object name, Object arguments)
CacheMap
get
in interface CacheMap
name
- the name of the object to get.arguments
- the arguments wich is passed to the load method of the
CacheLoader, if registered.
public void defineObject(Object name, Attributes attributes)
CacheMap
defineObject
in interface CacheMap
name
- the name of the object to associate the attributes with.attributes
- the attributes to associate.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |