public class SimpleBackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>> extends AbstractBackingCacheEntryStore<K,V,E>
BackingCacheEntryStore
that stores in a simple Map
and delegates to a provided
PersistentObjectStore
for persistence.Constructor and Description |
---|
SimpleBackingCacheEntryStore(PersistentObjectStore<K,E> store,
ServerEnvironment environment,
StatefulTimeoutInfo timeout,
BackingCacheEntryStoreConfig config)
Create a new SimpleIntegratedObjectStore.
|
Modifier and Type | Method and Description |
---|---|
E |
get(K key,
boolean lock)
Gets the entry with the given id from the store.
|
org.jboss.ejb.client.Affinity |
getStrictAffinity()
Returns the strict affinity associated with the entries of this cache
|
org.jboss.ejb.client.Affinity |
getWeakAffinity(K key)
Returns the weak affinity associated with the specified entry of this cache
|
boolean |
hasAffinity(K key)
Indicates whether the cache has an affinity for the specified key.
|
Set<K> |
insert(E entry)
Put a new entry into the store.
|
boolean |
isClustered()
Gets whether this store supports clustering functionality.
|
boolean |
isCompatibleWith(GroupCompatibilityChecker other)
Gets whether this object can work compatibly with another in the management of
SerializationGroup s. |
void |
passivate(E entry)
Remove the entry with the given key from any in-memory store while retaining it in the persistent store.
|
E |
remove(K id)
Remove the object with the given key from the store.
|
void |
start()
Perform any initialization work.
|
void |
stop()
Perform any shutdown work.
|
void |
update(E entry,
boolean modified)
Update an already cached item.
|
getConfig, getTimeout
public SimpleBackingCacheEntryStore(PersistentObjectStore<K,E> store, ServerEnvironment environment, StatefulTimeoutInfo timeout, BackingCacheEntryStoreConfig config)
public org.jboss.ejb.client.Affinity getStrictAffinity()
AffinitySupport
public org.jboss.ejb.client.Affinity getWeakAffinity(K key)
AffinitySupport
public boolean hasAffinity(K key)
AffinitySupport
key
- a candidate keypublic boolean isClustered()
BackingCacheEntryStore
true
if clustering is supported, false
otherwisepublic E get(K key, boolean lock)
BackingCacheEntryStore
key
- id
of the entry. Cannot be null
.id
. May return null
.public Set<K> insert(E entry)
BackingCacheEntryStore
entry
- the object to store. Cannot be null
.public void update(E entry, boolean modified)
BackingCacheEntryStore
entry
- the entry to updatemodified
- was the entry modified since #get(Object)
was called?public void passivate(E entry)
BackingCacheEntryStore
entry
- the entry to passivatepublic E remove(K id)
BackingCacheEntryStore
id
- id
of the entry. Cannot be null
.key
public void start()
BackingCacheEntryStore
public void stop()
BackingCacheEntryStore
public boolean isCompatibleWith(GroupCompatibilityChecker other)
GroupCompatibilityChecker
SerializationGroup
s.other
- the other checker. May be null
.true
if this object is compatible with other
, false
otherwiseCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.