Interface CallMeterBase

All Known Subinterfaces:
CallMeter, CallMeter.Child

public interface CallMeterBase
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Interface Description
    static interface  CallMeterBase.Timer  
  • Method Summary

    Modifier and Type Method Description
    default <T> T executeCallable​(java.util.concurrent.Callable<T> callable)
    Decorates and executes the decorated Callable.
    default <T> java.util.concurrent.CompletionStage<T> executeCompletionStageSupplier​(java.util.function.Supplier<java.util.concurrent.CompletionStage<T>> supplier)
    Decorates and executes the decorated CompletionStage Supplier.
    default void executeRunnable​(java.lang.Runnable runnable)
    Decorates and executes the decorated Runnable.
    default <T> T executeSupplier​(java.util.function.Supplier<T> supplier)
    Decorates and executes the decorated Supplier.
    CallMeterBase.Timer startTimer()  
  • Method Details

    • startTimer

      CallMeterBase.Timer startTimer()
    • executeRunnable

      default void executeRunnable​(java.lang.Runnable runnable) throws java.lang.Exception
      Decorates and executes the decorated Runnable.
      Parameters:
      runnable - the original Callable
      Throws:
      java.lang.Exception
    • executeCallable

      default <T> T executeCallable​(java.util.concurrent.Callable<T> callable) throws java.lang.Exception
      Decorates and executes the decorated Callable.
      Type Parameters:
      T - the type of results supplied by this Callable
      Parameters:
      callable - the original Callable
      Returns:
      the result of the decorated Callable.
      Throws:
      java.lang.Exception
    • executeSupplier

      default <T> T executeSupplier​(java.util.function.Supplier<T> supplier)
      Decorates and executes the decorated Supplier.
      Type Parameters:
      T - the type of results supplied by this supplier
      Parameters:
      supplier - the original Supplier
      Returns:
      the result of the decorated Supplier.
    • executeCompletionStageSupplier

      default <T> java.util.concurrent.CompletionStage<T> executeCompletionStageSupplier​(java.util.function.Supplier<java.util.concurrent.CompletionStage<T>> supplier)
      Decorates and executes the decorated CompletionStage Supplier.
      Type Parameters:
      T - the type of results supplied by this supplier
      Parameters:
      supplier - the CompletionStage Supplier
      Returns:
      the result of the decorated Supplier.