Class StampedLockServiceExecutor

    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      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.
    • Constructor Detail

      • StampedLockServiceExecutor

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

      • 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 extends Exception
        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
        E extends Exception
      • 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 ExceptionOptional<R> execute​(org.wildfly.common.function.ExceptionSupplier<R,​E> executeTask)
                                                          throws E extends Exception
        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
        E extends Exception
      • 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