public class InfinispanBackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>,C> extends AbstractBackingCacheEntryStore<K,V,E>
Constructor and Description |
---|
InfinispanBackingCacheEntryStore(org.infinispan.Cache<MarshalledValue<K,C>,MarshalledValue<E,C>> cache,
CacheInvoker invoker,
PassivationManager<K,E> passivationManager,
StatefulTimeoutInfo timeout,
ClusteredBackingCacheEntryStoreConfig config,
boolean controlCacheLifecycle,
MarshalledValueFactory<C> keyFactory,
MarshalledValueFactory<C> valueFactory,
C context,
SharedLocalYieldingClusterLockManager lockManager,
LockKeyFactory<K,C> lockKeyFactory,
Registry<String,?> registry) |
Modifier and Type | Method and Description |
---|---|
void |
activated(org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent<MarshalledValue<K,C>,MarshalledValue<E,C>> event) |
E |
get(K id,
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.
|
void |
passivated(org.infinispan.notifications.cachelistener.event.CacheEntryPassivatedEvent<MarshalledValue<K,C>,MarshalledValue<E,C>> event) |
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 InfinispanBackingCacheEntryStore(org.infinispan.Cache<MarshalledValue<K,C>,MarshalledValue<E,C>> cache, CacheInvoker invoker, PassivationManager<K,E> passivationManager, StatefulTimeoutInfo timeout, ClusteredBackingCacheEntryStoreConfig config, boolean controlCacheLifecycle, MarshalledValueFactory<C> keyFactory, MarshalledValueFactory<C> valueFactory, C context, SharedLocalYieldingClusterLockManager lockManager, LockKeyFactory<K,C> lockKeyFactory, Registry<String,?> registry)
public void start()
BackingCacheEntryStore
public void stop()
BackingCacheEntryStore
public boolean hasAffinity(K key)
AffinitySupport
key
- a candidate keypublic org.jboss.ejb.client.Affinity getStrictAffinity()
AffinitySupport
public org.jboss.ejb.client.Affinity getWeakAffinity(K key)
AffinitySupport
public Set<K> insert(E entry)
BackingCacheEntryStore
entry
- the object to store. Cannot be null
.public E get(K id, boolean lock)
BackingCacheEntryStore
id
- id
of the entry. Cannot be null
.id
. May return null
.public void update(E entry, boolean modified)
BackingCacheEntryStore
entry
- the entry to updatemodified
- was the entry modified since BackingCacheEntryStore.get(java.io.Serializable, boolean)
was called?public E remove(K id)
BackingCacheEntryStore
id
- id
of the entry. Cannot be null
.key
public void passivate(E entry)
BackingCacheEntryStore
entry
- the entry to passivatepublic boolean isClustered()
BackingCacheEntryStore
true
if clustering is supported, false
otherwisepublic boolean isCompatibleWith(GroupCompatibilityChecker other)
GroupCompatibilityChecker
SerializationGroup
s.other
- the other checker. May be null
.true
if this object is compatible with other
, false
otherwisepublic void activated(org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent<MarshalledValue<K,C>,MarshalledValue<E,C>> event)
public void passivated(org.infinispan.notifications.cachelistener.event.CacheEntryPassivatedEvent<MarshalledValue<K,C>,MarshalledValue<E,C>> event)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.