Package org.apache.tapestry5.ioc

# Interface OperationTracker

All Known Subinterfaces:
  `ComponentPageElementResources`, `InternalRegistry`

All Known Implementing Classes:
  `ComponentPageElementResourcesImpl`, `OperationTrackerImpl`, `PerThreadOperationTracker`, `QuietOperationTracker`, `RegistryImpl`

public interface OperationTracker
Used to track some set of operations in such a way that a failure (a thrown RuntimeException) will be logged along with a trace of the stack of operations.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static @interface`
  `OperationTracker.NonLoggableException`
  Annotation to be be used in exception classes whose instances are not meant to be logged in OperationTracker.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<T> T`
  `invoke(String description, Invokable<T> operation)`
  As with `run(String, Runnable)`, but the operation may return a value.
  `<T> T`
  `perform(String description, IOOperation<T> operation)`
  As with `invoke(String, Invokable)`, but the operation may throw an `IOException`.
  `void`
  `run(String description, Runnable operation)`
  Executes the operation.

- ## Method Details

  - ### run

    void run(String description, Runnable operation)
    Executes the operation. If the operation throws a `RuntimeException` it will be logged and rethrown wrapped as a `OperationException`.
    Parameters:
      `description` - used if there is an exception
      `operation` - to execute

  - ### invoke

    <T> T invoke(String description, Invokable<T> operation)
    As with `run(String, Runnable)`, but the operation may return a value.
    Parameters:
      `description` - used if there is an exception
      `operation` - to invoke
    Returns:
      result of operation

  - ### perform

    <T> T perform(String description, IOOperation<T> operation) throws IOException
    As with `invoke(String, Invokable)`, but the operation may throw an `IOException`.
    Parameters:
      `description` - used if there is an exception (outside of IOException)
      `operation` - to perform
    Returns:
      result of operation
    Throws:
      `IOException`
    Since:
      5.4