public interface TransactionExecutor
Modifier and Type | Interface and Description |
---|---|
static interface |
TransactionExecutor.Function<I,O>
A function is a class with a single method that takes an argument and returns a result.
|
static interface |
TransactionExecutor.Procedure<I>
A procedure is a class with a single void method that takes an argument.
|
static interface |
TransactionExecutor.Subroutine
A subroutine is a class with a single void method without arguments.
|
Modifier and Type | Method and Description |
---|---|
<O> O |
execute(Callable<O> callable)
Like
execute(Function, Object) but the callable has no argument. |
<I,O> O |
execute(TransactionExecutor.Function<I,O> function,
I input)
Execute a function under transactional semantics.
|
<I> void |
execute(TransactionExecutor.Procedure<I> procedure,
I input)
Like
execute(Function, Object) but without a return value. |
void |
execute(TransactionExecutor.Subroutine subroutine)
Like
execute(Function, Object) but without argument or return value. |
<O> O |
executeUnchecked(Callable<O> callable)
Same as
execute(Callable) but
suppresses exception with Throwables.propagate(Throwable) |
<I,O> O |
executeUnchecked(TransactionExecutor.Function<I,O> function,
I input)
Same as
execute(Function, Object) but
suppresses exception with Throwables.propagate(Throwable) |
<I> void |
executeUnchecked(TransactionExecutor.Procedure<I> procedure,
I input)
Same as
execute(Procedure, Object) but
suppresses exception with Throwables.propagate(Throwable) |
void |
executeUnchecked(TransactionExecutor.Subroutine subroutine)
Same as
execute(Subroutine) but
suppresses exception with Throwables.propagate(Throwable) |
<O> com.google.common.util.concurrent.ListenableFuture<O> |
submit(Callable<O> callable)
Same as
execute(Callable) but executes asynchronously |
<I,O> com.google.common.util.concurrent.ListenableFuture<O> |
submit(TransactionExecutor.Function<I,O> function,
I input)
Same as
execute(Function, Object) but executes asynchronously |
<I> com.google.common.util.concurrent.ListenableFuture<?> |
submit(TransactionExecutor.Procedure<I> procedure,
I input)
Same as
execute(Procedure, Object) but executes asynchronously |
com.google.common.util.concurrent.ListenableFuture<?> |
submit(TransactionExecutor.Subroutine subroutine)
Same as
execute(Subroutine) but executes asynchronously |
<I,O> O execute(TransactionExecutor.Function<I,O> function, I input) throws TransactionFailureException, InterruptedException
I
- the input type of the functionO
- the result type of the functionfunction
- the function to executeinput
- the input parameter for the functionTransactionConflictException
- if there is a write conflict with another transaction.TransactionFailureException
- if any exception is caught, be it from the function or from the datasets.InterruptedException
<I> void execute(TransactionExecutor.Procedure<I> procedure, I input) throws TransactionFailureException, InterruptedException
execute(Function, Object)
but without a return value.<O> O execute(Callable<O> callable) throws TransactionFailureException, InterruptedException
execute(Function, Object)
but the callable has no argument.void execute(TransactionExecutor.Subroutine subroutine) throws TransactionFailureException, InterruptedException
execute(Function, Object)
but without argument or return value.<I,O> O executeUnchecked(TransactionExecutor.Function<I,O> function, I input)
execute(Function, Object)
but
suppresses exception with Throwables.propagate(Throwable)
<I> void executeUnchecked(TransactionExecutor.Procedure<I> procedure, I input)
execute(Procedure, Object)
but
suppresses exception with Throwables.propagate(Throwable)
<O> O executeUnchecked(Callable<O> callable)
execute(Callable)
but
suppresses exception with Throwables.propagate(Throwable)
void executeUnchecked(TransactionExecutor.Subroutine subroutine)
execute(Subroutine)
but
suppresses exception with Throwables.propagate(Throwable)
<I,O> com.google.common.util.concurrent.ListenableFuture<O> submit(TransactionExecutor.Function<I,O> function, I input)
execute(Function, Object)
but executes asynchronously<I> com.google.common.util.concurrent.ListenableFuture<?> submit(TransactionExecutor.Procedure<I> procedure, I input)
execute(Procedure, Object)
but executes asynchronously<O> com.google.common.util.concurrent.ListenableFuture<O> submit(Callable<O> callable)
execute(Callable)
but executes asynchronouslycom.google.common.util.concurrent.ListenableFuture<?> submit(TransactionExecutor.Subroutine subroutine)
execute(Subroutine)
but executes asynchronouslyCopyright © 2017 The Apache Software Foundation. All rights reserved.