Class CounterInterceptor

java.lang.Object
org.infinispan.interceptors.BaseAsyncInterceptor
org.infinispan.interceptors.DDAsyncInterceptor
org.infinispan.interceptors.BaseCustomAsyncInterceptor
org.infinispan.counter.impl.interceptor.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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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 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

    • CounterInterceptor

      public CounterInterceptor()
  • Method Details

    • 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