Class AnchoredDistributionInterceptor

java.lang.Object
org.infinispan.interceptors.BaseAsyncInterceptor
org.infinispan.interceptors.DDAsyncInterceptor
org.infinispan.interceptors.impl.BaseRpcInterceptor
org.infinispan.interceptors.impl.ClusteringInterceptor
org.infinispan.interceptors.distribution.BaseDistributionInterceptor
org.infinispan.interceptors.distribution.NonTxDistributionInterceptor
org.infinispan.anchored.impl.AnchoredDistributionInterceptor
All Implemented Interfaces:
org.infinispan.commands.Visitor, org.infinispan.interceptors.AsyncInterceptor

public class AnchoredDistributionInterceptor extends org.infinispan.interceptors.distribution.NonTxDistributionInterceptor
A NonTxDistributionInterceptor replacement for anchored caches.

The interceptor behaves mostly like NonTxDistributionInterceptor, but when the primary sends the command to the backups it only sends the actual value to the key's anchor owner.

If the key is new, the anchor owner is the last member of the read CH. If the key already exists in the cache, the anchor owner is preserved.

Since:
11
Author:
Dan Berindei
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.infinispan.interceptors.distribution.BaseDistributionInterceptor

    org.infinispan.interceptors.distribution.BaseDistributionInterceptor.ReadManyCommandHelper<C extends org.infinispan.commands.VisitableCommand>, org.infinispan.interceptors.distribution.BaseDistributionInterceptor.ReadOnlyManyHelper

    Nested classes/interfaces inherited from class org.infinispan.interceptors.impl.ClusteringInterceptor

    org.infinispan.interceptors.impl.ClusteringInterceptor.ClusteredGetAllFuture
  • Field Summary

    Fields inherited from class org.infinispan.interceptors.distribution.BaseDistributionInterceptor

    expirationManager, isL1Enabled, isReplicated, keyPartitioner, rvrl, timeService

    Fields inherited from class org.infinispan.interceptors.impl.ClusteringInterceptor

    cf, dataContainer, distributionManager, entryFactory, lockManager

    Fields inherited from class org.infinispan.interceptors.impl.BaseRpcInterceptor

    componentRegistry, defaultSynchronous, rpcManager

    Fields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor

    cacheConfiguration
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected <C extends org.infinispan.commands.write.WriteCommand, Container, Item>
    Object
    handleReadWriteManyCommand(org.infinispan.context.InvocationContext ctx, C command, org.infinispan.interceptors.distribution.WriteManyCommandHelper<C,Item,Container> helper)
     
    protected Object
    primaryReturnHandler(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.AbstractDataWriteCommand command, Object localResult)
     
    visitPutMapCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)
     

    Methods inherited from class org.infinispan.interceptors.distribution.NonTxDistributionInterceptor

    visitComputeCommand, visitComputeIfAbsentCommand, visitIracPutKeyValueCommand, visitPutKeyValueCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitRemoveCommand, visitReplaceCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommand

    Methods inherited from class org.infinispan.interceptors.distribution.BaseDistributionInterceptor

    configure, getLog, handleFunctionalReadManyCommand, handleNonTxWriteCommand, handleRemotelyRetrievedKeys, invokeRemotely, readNeedsRemoteValue, remoteGetMany, remoteGetSingleKey, remoteReadOnlyCommand, retrieveDistributionInfo, unwrapFunctionalManyResultOnOrigin, unwrapFunctionalResultOnOrigin, visitClearCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeyValueCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, wrapFunctionalManyResultOnNonOrigin, wrapFunctionalResultOnNonOriginOnReturn, wrapRemoteEntry

    Methods inherited from class org.infinispan.interceptors.impl.ClusteringInterceptor

    getCacheTopology, getSuccessfulResponseOrFail, init, unexpected, visitSizeCommand, visitTouchCommand

    Methods inherited from class org.infinispan.interceptors.impl.BaseRpcInterceptor

    isLocalModeForced, isSynchronous, shouldInvokeRemoteTxCommand, shouldLoad, transactionRemotelyPrepared

    Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor

    handleDefault, visitCommand, visitCommitCommand, visitEntrySetCommand, visitEvictCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitRollbackCommand, visitUnknownCommand

    Methods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor

    asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrException

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.infinispan.commands.Visitor

    visitRemoveExpiredCommand
  • Constructor Details

    • AnchoredDistributionInterceptor

      public AnchoredDistributionInterceptor()
  • Method Details

    • primaryReturnHandler

      protected Object primaryReturnHandler(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.AbstractDataWriteCommand command, Object localResult)
      Overrides:
      primaryReturnHandler in class org.infinispan.interceptors.distribution.BaseDistributionInterceptor
    • handleReadWriteManyCommand

      protected <C extends org.infinispan.commands.write.WriteCommand, Container, Item> Object handleReadWriteManyCommand(org.infinispan.context.InvocationContext ctx, C command, org.infinispan.interceptors.distribution.WriteManyCommandHelper<C,Item,Container> helper) throws Exception
      Overrides:
      handleReadWriteManyCommand in class org.infinispan.interceptors.distribution.NonTxDistributionInterceptor
      Throws:
      Exception
    • visitPutMapCommand

      public Object visitPutMapCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command) throws Throwable
      Specified by:
      visitPutMapCommand in interface org.infinispan.commands.Visitor
      Overrides:
      visitPutMapCommand in class org.infinispan.interceptors.distribution.NonTxDistributionInterceptor
      Throws:
      Throwable