Type Parameters:
T - The type of the keys used to identify the computations.
All Superinterfaces:
Runnable

public interface IComputation<T> extends Runnable
Encapsulates the logic of a computation that can be identified by a key.
  • Method Summary

    Modifier and Type
    Method
    Description
    The computation identifier.
    com.google.common.util.concurrent.FutureCallback<Object>
    Post-treatment.

    Methods inherited from interface java.lang.Runnable

    run
  • Method Details

    • getKey

      T getKey()
      The computation identifier.
      Returns:
      The computation identifier.
    • getPostTreatment

      com.google.common.util.concurrent.FutureCallback<Object> getPostTreatment()
      Post-treatment.
      Returns:
      The post-tretament to run when this computation is over, whatever its outcome. This should be called by the "framework" in a finally clause to guarantee it is always executed. It is allowed for implementors to return null.