ThreadIntermediary.ViewAndNextLatch

public static class ViewAndNextLatch

A simple structure allowing the return of the current state/history and a latch that indicates when the next state will be ready.

Author:The Condor

Fields

historyView

public final HistoryView historyView

nextStateLatch

public final CountDownLatch nextStateLatch

stateType

public final StateType stateType

stateView

public final StateView stateView

Constructors

ViewAndNextLatch

public ViewAndNextLatch(StateView stateView, HistoryView historyView, StateType stateType, CountDownLatch nextStateLatch)

Build a structure with a view and a latch.

Parameters:
  • stateView – The current state.
  • historyView – The current history.
  • stateType – INITIAL if this is the first state of an episode, TERMINAL if it is the last, MIDDLE otherwise
  • nextStateLatch – A latch for the next state.