org.infinispan.interceptors
Class DistCacheStoreInterceptor
java.lang.Object
org.infinispan.commands.AbstractVisitor
org.infinispan.interceptors.base.CommandInterceptor
org.infinispan.interceptors.base.JmxStatsCommandInterceptor
org.infinispan.interceptors.CacheStoreInterceptor
org.infinispan.interceptors.DistCacheStoreInterceptor
- All Implemented Interfaces:
- Visitor, JmxStatisticsExposer
public class DistCacheStoreInterceptor
- extends CacheStoreInterceptor
Cache store interceptor specific for the distribution cache mode. Put operations has been modified in such way that
if they put operation is the result of an L1 put, storing in the cache store is ignore. This is done so that inmortal
entries that get converted into mortal ones when putting into L1 don't get propagated to the cache store.
Secondly, in a replicated environment where a shared cache store is used, the node in which the cache operation is
executed is the one responsible for interacting with the cache. This doesn't work with distributed mode and instead,
in a shared cache store situation, the first owner of the key is the one responsible for storing it.
In the particular case of putAll(), individual keys are checked and if a shared cache store environment has been
configured, only the first owner of that key will actually store it to the cache store. In a unshared environment
though, only those nodes that are owners of the key would store it to their local cache stores.
- Since:
- 4.0
- Author:
- Galder ZamarreƱo
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DistCacheStoreInterceptor
public DistCacheStoreInterceptor()
inject
public void inject(DistributionManager dm,
Transport transport)
visitPutKeyValueCommand
public Object visitPutKeyValueCommand(InvocationContext ctx,
PutKeyValueCommand command)
throws Throwable
- Specified by:
visitPutKeyValueCommand
in interface Visitor
- Overrides:
visitPutKeyValueCommand
in class CacheStoreInterceptor
- Throws:
Throwable
visitPutMapCommand
public Object visitPutMapCommand(InvocationContext ctx,
PutMapCommand command)
throws Throwable
- Specified by:
visitPutMapCommand
in interface Visitor
- Overrides:
visitPutMapCommand
in class CacheStoreInterceptor
- Throws:
Throwable
visitRemoveCommand
public Object visitRemoveCommand(InvocationContext ctx,
RemoveCommand command)
throws Throwable
- Specified by:
visitRemoveCommand
in interface Visitor
- Overrides:
visitRemoveCommand
in class CacheStoreInterceptor
- Throws:
Throwable
visitReplaceCommand
public Object visitReplaceCommand(InvocationContext ctx,
ReplaceCommand command)
throws Throwable
- Specified by:
visitReplaceCommand
in interface Visitor
- Overrides:
visitReplaceCommand
in class CacheStoreInterceptor
- Throws:
Throwable
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.