Class OperationTimer<T>

java.lang.Object
org.duracloud.common.util.OperationTimer<T>
Type Parameters:
T -

public abstract class OperationTimer<T> extends Object
A handy class that lets you wrap any operation in a stopwatch that will output elapsed time and an arbitrary message to the log.
Author:
Daniel Bernstein
  • Constructor Details

    • OperationTimer

      public OperationTimer(String message)
  • Method Details

    • execute

      public T execute() throws Exception
      Throws:
      Exception
    • executeImpl

      public abstract T executeImpl() throws Exception
      Implements the execution of the operation to be timed.
      Returns:
      Throws:
      Exception