public class InvocationHelper extends Object
VisitableCommand through this cache AsyncInterceptorChain.
It creates injected transactions and auto commits them, if the cache is transactional.
| Modifier and Type | Field and Description |
|---|---|
protected BatchContainer |
batchContainer |
protected BlockingManager |
blockingManager |
protected Configuration |
config |
protected InvocationContextFactory |
invocationContextFactory |
protected AsyncInterceptorChain |
invoker |
protected TransactionManager |
transactionManager |
| Constructor and Description |
|---|
InvocationHelper() |
protected AsyncInterceptorChain invoker
protected InvocationContextFactory invocationContextFactory
protected TransactionManager transactionManager
protected Configuration config
protected BatchContainer batchContainer
protected BlockingManager blockingManager
public <T> T invoke(VisitableCommand command, int keyCount)
invoke(ContextBuilder, VisitableCommand, int) but using the default ContextBuilder.T - The return type.command - The VisitableCommand to invoke.keyCount - The number of keys affected by the command.public <T> T invoke(ContextBuilder builder, VisitableCommand command, int keyCount)
invoke(InvocationContext, VisitableCommand) but using builder to build the InvocationContext to use.T - The return type.builder - The ContextBuilder to create the InvocationContext to use.command - The VisitableCommand to invoke.keyCount - The number of keys affected by the command.public <T> T invoke(InvocationContext context, VisitableCommand command)
command using context.
This method blocks until the command finishes. Use invokeAsync(InvocationContext,
VisitableCommand) for non-blocking.
T - The return type.context - The InvocationContext to use.command - The VisitableCommand to invoke.public <T> CompletableFuture<T> invokeAsync(VisitableCommand command, int keyCount)
invoke(ContextBuilder, VisitableCommand, int) but using the default ContextBuilder.T - The return type.command - The VisitableCommand to invoke.keyCount - The number of keys affected by the command.CompletableFuture with the result.public <T> CompletableFuture<T> invokeAsync(ContextBuilder builder, VisitableCommand command, int keyCount)
invoke(InvocationContext, VisitableCommand) but using the InvocationContext created by
builder.T - The return type.builder - The ContextBuilder to create the InvocationContext to use.command - The VisitableCommand to invoke.keyCount - The number of keys affected by the command.CompletableFuture with the result.public <T> CompletableFuture<T> invokeAsync(InvocationContext context, VisitableCommand command)
command using context and returns a CompletableFuture.
The CompletableFuture is completed with the return value of the invocation.
T - The return type.context - The InvocationContext to use.command - The VisitableCommand to invoke.CompletableFuture with the result.public ContextBuilder defaultContextBuilderForWrite()
ContextBuilder implementation for write operations.public InvocationContext createInvocationContextWithImplicitTransaction(int keyCount, boolean forceCreateTransaction)
keyCount - how many keys are expected to be changedCopyright © 2022 JBoss by Red Hat. All rights reserved.