Class StampedLockServiceExecutor

java.lang.Object
org.wildfly.clustering.service.concurrent.StampedLockServiceExecutor
All Implemented Interfaces:
Executor, Executor, ServiceExecutor

@Deprecated(forRemoval=true) public class StampedLockServiceExecutor extends Object implements ServiceExecutor
Deprecated, for removal: This API element is subject to removal in a future version.
To be removed without replacement
ServiceExecutor implemented via a StampedLock.
Author:
Paul Ferraro
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close(Runnable closeTask)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Closes the service, executing the specified task, first waiting for any concurrent executions to complete.
    void
    execute(Runnable executeTask)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    <R> Optional<R>
    execute(Supplier<R> executeTask)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Executes the specified task, but only if the service was not already closed.
    <E extends Exception>
    void
    execute(org.wildfly.common.function.ExceptionRunnable<E> executeTask)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Executes the specified runner.
    <R, E extends Exception>
    Optional<R>
    execute(org.wildfly.common.function.ExceptionSupplier<R,E> executeTask)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Executes the specified task, but only if the service was not already closed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StampedLockServiceExecutor

      public StampedLockServiceExecutor()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • execute

      public void execute(Runnable executeTask)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      execute in interface Executor
    • execute

      public <E extends Exception> void execute(org.wildfly.common.function.ExceptionRunnable<E> executeTask) throws E
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Executor
      Executes the specified runner.
      Specified by:
      execute in interface Executor
      Type Parameters:
      E - the exception type
      Parameters:
      executeTask - a runnable task
      Throws:
      E - if execution fails
    • execute

      public <R> Optional<R> execute(Supplier<R> executeTask)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ServiceExecutor
      Executes the specified task, but only if the service was not already closed. If service is already closed, the task is not run. If executed, the specified task must return a non-null value, to be distinguishable from a non-execution.
      Specified by:
      execute in interface ServiceExecutor
      Parameters:
      executeTask - a task to execute
      Returns:
      an optional value that is present only if the specified task was run.
    • execute

      public <R, E extends Exception> Optional<R> execute(org.wildfly.common.function.ExceptionSupplier<R,E> executeTask) throws E
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ServiceExecutor
      Executes the specified task, but only if the service was not already closed. If service is already closed, the task is not run. If executed, the specified task must return a non-null value, to be distinguishable from a non-execution.
      Specified by:
      execute in interface ServiceExecutor
      Parameters:
      executeTask - a task to execute
      Returns:
      an optional value that is present only if the specified task was run.
      Throws:
      E - if the task execution failed
    • close

      public void close(Runnable closeTask)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ServiceExecutor
      Closes the service, executing the specified task, first waiting for any concurrent executions to complete. The specified task will only execute once, irrespective on subsequent ServiceExecutor.close(Runnable) invocations.
      Specified by:
      close in interface ServiceExecutor
      Parameters:
      closeTask - a task which closes the service