Package ratpack.exec

Interface ExecutionRef

  • All Superinterfaces:
    Registry

    public interface ExecutionRef
    extends Registry
    A reference to an Execution that is usable from outside of it. An execution ref is-a registry. It is a read only view of the actual execution registry, while the execution is active. Once the execution has completed, the registry is effectively empty. Note that there are no guarantees that the registry is immutable. The execution may mutate the registry or its entries. Concurrent access via this reference is however safe. A ref avoids holding a long lived reference to the actual execution and its registry. Therefore, holding a reference to an execution-ref in memory does not prevent the execution's registry from being garbage collected.
    Since:
    1.6
    See Also:
    Execution.getParent()
    • Method Detail

      • maybeParent

        Optional<ExecutionRef> maybeParent()
        A ref to the execution that forked this execution, if it has a parent.
        Returns:
        a ref to the execution that forked this execution
      • isComplete

        boolean isComplete()
        Whether the execution this refers to is complete. This method is equivalent to Execution.isComplete().
        Returns:
        whether the execution this refers to is complete