Interface TerminationAwareStateLockingExecutor

All Known Implementing Classes:
UnmanagedTransaction
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TerminationAwareStateLockingExecutor
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    execute(Function<Throwable,T> causeOfTerminationConsumer)
    Locks the state and executes the supplied Consumer with a cause of termination if the state is terminated.
  • Method Details

    • execute

      <T> T execute(Function<Throwable,T> causeOfTerminationConsumer)
      Locks the state and executes the supplied Consumer with a cause of termination if the state is terminated.
      Parameters:
      causeOfTerminationConsumer - the consumer accepting