|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.j_spaces.map.AbstractMap com.j_spaces.map.GSMapImpl
public final class GSMapImpl
This class provides an implementation to GigaSpaces IMap interface, for Distributed
Caching using Map
API. Simply call Map.get and Map.put methods to store
and retrieve values into or from the cache.
For more detailed information about GSMapImpl class usage see: Cache API
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class com.j_spaces.map.AbstractMap |
---|
NONE_COMPRESSION, ZIP_COMPRESSION |
Constructor Summary | |
---|---|
GSMapImpl(IJSpace space)
GSMap constructor. |
|
GSMapImpl(IJSpace space,
int compress)
GSMap constructor. |
|
GSMapImpl(IJSpace space,
long timeToLive)
GSMap constructor. |
|
GSMapImpl(IJSpace space,
Transaction txn)
GSMap constructor. |
Method Summary | |
---|---|
void |
addListener(CacheListener listener)
Unsupported Operation! |
void |
clear()
The clear method will remove all objects from the cache including the key and the associated value. |
void |
clear(boolean clearMaster)
The clear method will remove all objects from the cache including the key and the associated value. |
boolean |
containsKey(Object key)
Returns true if the cache contains the specified key. |
boolean |
containsValue(Object value)
Returns true if this cache maps one or more keys to the specified value. |
Set |
entrySet()
Returns a set view of the objects currently contained in the cache. |
boolean |
evict(Object key)
The evict method will remove object from the cache the matches the provided key. |
CacheEntry |
getCacheEntry(Object key)
Returns the CacheEntry object associated with the object identified by "key". |
Set |
keySet()
Returns a set view of the keys currently contained in the cache. |
Object |
peek(Object key)
The peek method will return the object associated with "key" if it currently exists (and is valid) in the cache. |
void |
removeListener(CacheListener listener)
Unsupported Operation! |
Collection |
values()
Returns a collection view of the values contained in this cache. |
Methods inherited from class com.j_spaces.map.AbstractMap |
---|
get, get, get, getAll, getLocalSpace, getMasterSpace, getTimeToLive, getTransaction, getWaitForResponse, isEmpty, isVersioned, load, loadAll, put, put, put, putAll, putAll, remove, remove, remove, setTimeToLive, setTransaction, setVersioned, setWaitForResponse, size |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.j_spaces.javax.cache.Cache |
---|
equals, hashCode |
Constructor Detail |
---|
public GSMapImpl(IJSpace space)
space
- Space proxy or DCache proxy.public GSMapImpl(IJSpace space, long timeToLive)
space
- Space proxy or DCache proxy.timeToLive
- Time to live for value
object in cache.public GSMapImpl(IJSpace space, int compress)
space
- Space proxy or DCache proxy.compress
- Compress value
object in cache.public GSMapImpl(IJSpace space, Transaction txn)
space
- Space proxy or DCache proxy.txn
- if not null
all operation will be executed with the desired
transaction.
To set new transaction use: setTransaction(txn)
To reset the transaction use: setTransaction(null)
To get the current transaction use: getTransaction()Method Detail |
---|
public boolean containsKey(Object key)
key
- key whose presence in this cache is to be tested.
true
, if the cache contains the specified key.public boolean containsValue(Object value)
value
- value whose presence in this cache is to be tested.
true
, if the cache contains the specified value.public void clear()
public void clear(boolean clearMaster)
clearMaster
- if true
clear also master, when false
equals to clear()public Collection values()
public Set entrySet()
public Set keySet()
public final void addListener(CacheListener listener)
listener
- call back CacheListener
public final boolean evict(Object key)
key
- the key to evict
true
, if the key was evictedpublic final CacheEntry getCacheEntry(Object key)
key
- key whose associated value is to be returned.
public Object peek(Object key)
key
- key whose associated value is to be peek.
public void removeListener(CacheListener listener)
listener
- the CacheListener
to remove
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |