com.jivesoftware.forum.database.querycache
Class LocalPutGetRemoveStrategy
java.lang.Object
com.jivesoftware.forum.database.querycache.LocalPutGetRemoveStrategy
- All Implemented Interfaces:
- QueryCache.PutGetRemoveStrategy, com.tangosol.util.MapListener, java.util.EventListener
public class LocalPutGetRemoveStrategy
- extends java.lang.Object
- implements QueryCache.PutGetRemoveStrategy, com.tangosol.util.MapListener
Implements put get and remove operations for QueryCache when clustering is enabled. The underlying cache is
an instance of CoherenceCache
, which this class observes with a MapListener
to manually maintain
an index of object type/id pairs to cache keys, as well as simply object types to keys.
Method Summary |
void |
entryDeleted(com.tangosol.util.MapEvent mapEvent)
|
void |
entryInserted(com.tangosol.util.MapEvent mapEvent)
|
void |
entryUpdated(com.tangosol.util.MapEvent mapEvent)
|
java.lang.Object |
get(java.lang.Object key)
|
java.util.Collection |
getKeysForIDKey(java.lang.String idKey)
Returns all QueryCacheKey s with the corresponding id key. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
remove(int objectType,
long objectID)
|
java.lang.Object |
remove(java.lang.Object key)
|
void |
removeUsers()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalPutGetRemoveStrategy
public LocalPutGetRemoveStrategy(CoherenceCache coherenceCache,
QueryCache owner)
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get
in interface QueryCache.PutGetRemoveStrategy
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Specified by:
put
in interface QueryCache.PutGetRemoveStrategy
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove
in interface QueryCache.PutGetRemoveStrategy
remove
public void remove(int objectType,
long objectID)
- Specified by:
remove
in interface QueryCache.PutGetRemoveStrategy
removeUsers
public void removeUsers()
- Specified by:
removeUsers
in interface QueryCache.PutGetRemoveStrategy
getKeysForIDKey
public java.util.Collection getKeysForIDKey(java.lang.String idKey)
- Returns all
QueryCacheKey
s with the corresponding id key.
- Parameters:
idKey
- the idKey to return QueryCacheKey
s for.
- Returns:
- all
QueryCacheKey
s with the corresponding id key.
entryInserted
public void entryInserted(com.tangosol.util.MapEvent mapEvent)
- Specified by:
entryInserted
in interface com.tangosol.util.MapListener
entryUpdated
public void entryUpdated(com.tangosol.util.MapEvent mapEvent)
- Specified by:
entryUpdated
in interface com.tangosol.util.MapListener
entryDeleted
public void entryDeleted(com.tangosol.util.MapEvent mapEvent)
- Specified by:
entryDeleted
in interface com.tangosol.util.MapListener
Copyright © 1999-2006 Jive Software.