Class CounterInterceptor

  • All Implemented Interfaces:
    org.infinispan.commands.Visitor, org.infinispan.interceptors.AsyncInterceptor

    public class CounterInterceptor
    extends org.infinispan.interceptors.BaseCustomAsyncInterceptor
    Interceptor for the counters cache.

    Since the state transfer doesn't know about the Flag.SKIP_CACHE_STORE and Flag.SKIP_CACHE_LOAD flags, all the counters are persisted. However, we only want the Storage.PERSISTENT configurations to be persisted.

    This interceptor checks the configuration's Storage and sets the Flag.SKIP_CACHE_LOAD and Flag.SKIP_CACHE_STORE flags.

    Since:
    9.0
    Author:
    Pedro Ruivo
    • Field Summary

      • Fields inherited from class org.infinispan.interceptors.BaseCustomAsyncInterceptor

        cache, embeddedCacheManager
      • Fields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor

        cacheConfiguration
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Object visitPutKeyValueCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)  
      • Methods inherited from class org.infinispan.interceptors.BaseCustomAsyncInterceptor

        start, stop
      • Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor

        handleDefault, visitClearCommand, visitCommand, visitCommitCommand, visitComputeCommand, visitComputeIfAbsentCommand, visitEntrySetCommand, visitEvictCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitInvalidateL1Command, visitIracPutKeyValueCommand, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitPutMapCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitRemoveCommand, visitReplaceCommand, visitRollbackCommand, visitSizeCommand, visitTouchCommand, visitUnknownCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommand
      • 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 interface org.infinispan.commands.Visitor

        visitRemoveExpiredCommand
    • Constructor Detail

      • CounterInterceptor

        public CounterInterceptor()
    • Method Detail

      • visitPutKeyValueCommand

        public Object visitPutKeyValueCommand​(org.infinispan.context.InvocationContext ctx,
                                              org.infinispan.commands.write.PutKeyValueCommand command)
                                       throws Throwable
        Specified by:
        visitPutKeyValueCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitPutKeyValueCommand in class org.infinispan.interceptors.DDAsyncInterceptor
        Throws:
        Throwable