Package org.infinispan.interceptors.impl
Class TransactionalExceptionEvictionInterceptor
- java.lang.Object
-
- org.infinispan.interceptors.BaseAsyncInterceptor
-
- org.infinispan.interceptors.DDAsyncInterceptor
-
- org.infinispan.interceptors.impl.TransactionalExceptionEvictionInterceptor
-
- All Implemented Interfaces:
Visitor
,AsyncInterceptor
public class TransactionalExceptionEvictionInterceptor extends DDAsyncInterceptor
Interceptor that prevents the cache from inserting too many entries over a configured maximum amount. This interceptor assumes that there is a transactional cache without one phase commit semantics.- Since:
- 9.0
- Author:
- wburns
-
-
Field Summary
-
Fields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
cacheConfiguration
-
-
Constructor Summary
Constructors Constructor Description TransactionalExceptionEvictionInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
entryExpired(CacheEntryExpiredEvent event)
long
getCurrentSize()
long
getMaxSize()
long
getMinSize()
void
inject(Configuration config, CacheNotifier cacheNotifier, InternalDataContainer dataContainer, KeyValueMetadataSizeCalculator calculator, DistributionManager dm)
long
pendingTransactionCount()
void
start()
void
stop()
Object
visitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)
Object
visitCommitCommand(TxInvocationContext ctx, org.infinispan.commands.tx.CommitCommand command)
Object
visitInvalidateCommand(InvocationContext ctx, org.infinispan.commands.write.InvalidateCommand command)
Object
visitPrepareCommand(TxInvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command)
Object
visitRollbackCommand(TxInvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command)
-
Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor
handleDefault, visitCommand, visitComputeCommand, visitComputeIfAbsentCommand, visitDistributedExecuteCommand, visitEntrySetCommand, visitEvictCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeysInGroupCommand, visitGetKeyValueCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPutKeyValueCommand, visitPutMapCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitReadWriteKeyCommand, visitReadWriteKeyValueCommand, visitReadWriteManyCommand, visitReadWriteManyEntriesCommand, visitRemoveCommand, visitReplaceCommand, visitSizeCommand, visitUnknownCommand, visitWriteOnlyKeyCommand, visitWriteOnlyKeyValueCommand, visitWriteOnlyManyCommand, visitWriteOnlyManyEntriesCommand
-
Methods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor
asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, 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
visitApplyDeltaCommand, visitRemoveExpiredCommand
-
-
-
-
Method Detail
-
getCurrentSize
public long getCurrentSize()
-
getMaxSize
public long getMaxSize()
-
getMinSize
public long getMinSize()
-
pendingTransactionCount
public long pendingTransactionCount()
-
inject
public void inject(Configuration config, CacheNotifier cacheNotifier, InternalDataContainer dataContainer, KeyValueMetadataSizeCalculator calculator, DistributionManager dm)
-
start
public void start()
-
stop
public void stop()
-
entryExpired
public void entryExpired(CacheEntryExpiredEvent event)
-
visitInvalidateCommand
public Object visitInvalidateCommand(InvocationContext ctx, org.infinispan.commands.write.InvalidateCommand command) throws Throwable
- Specified by:
visitInvalidateCommand
in interfaceVisitor
- Overrides:
visitInvalidateCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitClearCommand
public Object visitClearCommand(InvocationContext ctx, org.infinispan.commands.write.ClearCommand command) throws Throwable
- Specified by:
visitClearCommand
in interfaceVisitor
- Overrides:
visitClearCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitPrepareCommand
public Object visitPrepareCommand(TxInvocationContext ctx, org.infinispan.commands.tx.PrepareCommand command) throws Throwable
- Specified by:
visitPrepareCommand
in interfaceVisitor
- Overrides:
visitPrepareCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitRollbackCommand
public Object visitRollbackCommand(TxInvocationContext ctx, org.infinispan.commands.tx.RollbackCommand command) throws Throwable
- Specified by:
visitRollbackCommand
in interfaceVisitor
- Overrides:
visitRollbackCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
visitCommitCommand
public Object visitCommitCommand(TxInvocationContext ctx, org.infinispan.commands.tx.CommitCommand command) throws Throwable
- Specified by:
visitCommitCommand
in interfaceVisitor
- Overrides:
visitCommitCommand
in classDDAsyncInterceptor
- Throws:
Throwable
-
-