public class InfinispanBackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>,C> extends AbstractBackingCacheEntryStore<K,V,E> implements org.infinispan.affinity.KeyGenerator<K>
| Constructor and Description |
|---|
InfinispanBackingCacheEntryStore(org.infinispan.Cache<K,MarshalledValue<E,C>> cache,
CacheInvoker invoker,
IdentifierFactory<K> identifierFactory,
KeyAffinityServiceFactory affinityFactory,
PassivationManager<K,E> passivationManager,
StatefulTimeoutInfo timeout,
ClusteredBackingCacheEntryStoreConfig config,
boolean controlCacheLifecycle,
MarshalledValueFactory<C> valueFactory,
C context,
NodeFactory<org.infinispan.remoting.transport.Address> nodeFactory,
Registry<String,?> registry) |
| Modifier and Type | Method and Description |
|---|---|
void |
activated(org.infinispan.notifications.cachelistener.event.CacheEntryActivatedEvent<MarshalledValue<K,C>,MarshalledValue<E,C>> event) |
K |
createIdentifier() |
E |
get(K id,
boolean lock)
Gets the entry with the given id from the store.
|
K |
getKey() |
int |
getPassivatedCount() |
int |
getStoreSize() |
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
SerializationGroups. |
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, getTimeoutpublic InfinispanBackingCacheEntryStore(org.infinispan.Cache<K,MarshalledValue<E,C>> cache, CacheInvoker invoker, IdentifierFactory<K> identifierFactory, KeyAffinityServiceFactory affinityFactory, PassivationManager<K,E> passivationManager, StatefulTimeoutInfo timeout, ClusteredBackingCacheEntryStoreConfig config, boolean controlCacheLifecycle, MarshalledValueFactory<C> valueFactory, C context, NodeFactory<org.infinispan.remoting.transport.Address> nodeFactory, Registry<String,?> registry)
public void start()
BackingCacheEntryStorestart in interface BackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>public void stop()
BackingCacheEntryStorestop in interface BackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>public K createIdentifier()
createIdentifier in interface IdentifierFactory<K extends Serializable>public K getKey()
getKey in interface org.infinispan.affinity.KeyGenerator<K extends Serializable>public boolean hasAffinity(K key)
AffinitySupporthasAffinity in interface AffinitySupport<K extends Serializable>key - a candidate keypublic org.jboss.ejb.client.Affinity getStrictAffinity()
AffinitySupportgetStrictAffinity in interface AffinitySupport<K extends Serializable>public org.jboss.ejb.client.Affinity getWeakAffinity(K key)
AffinitySupportgetWeakAffinity in interface AffinitySupport<K extends Serializable>public Set<K> insert(E entry)
BackingCacheEntryStoreinsert in interface BackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>entry - the object to store. Cannot be null.public E get(K id, boolean lock)
BackingCacheEntryStoreget in interface BackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>id - id of the entry. Cannot be null.id. May return null.public void update(E entry, boolean modified)
BackingCacheEntryStoreupdate in interface BackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>entry - the entry to updatemodified - was the entry modified since BackingCacheEntryStore.get(java.io.Serializable, boolean) was called?public E remove(K id)
BackingCacheEntryStoreremove in interface BackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>id - id of the entry. Cannot be null.keypublic void passivate(E entry)
BackingCacheEntryStorepassivate in interface BackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>entry - the entry to passivatepublic boolean isClustered()
BackingCacheEntryStoreisClustered in interface BackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>true if clustering is supported, false otherwisepublic boolean isCompatibleWith(GroupCompatibilityChecker other)
GroupCompatibilityCheckerSerializationGroups.isCompatibleWith in interface GroupCompatibilityCheckerother - 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)
public int getStoreSize()
getStoreSize in interface BackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>public int getPassivatedCount()
getPassivatedCount in interface BackingCacheEntryStore<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>Copyright © 2013 JBoss by Red Hat. All rights reserved.