public class OrderedStateChanger<S extends State> extends Object implements StateChanger<S>
StateChanger
that uses a StateLock
to ensure updates or ordered.Constructor and Description |
---|
OrderedStateChanger(StateChanger<S> stateChanger,
StateLock stateLock) |
Modifier and Type | Method and Description |
---|---|
void |
setState(S state)
Set the state to given state.
|
void |
setState(S state,
Date date)
Set the state to the given state with the
given event time.
|
void |
setStateException(Throwable t)
Set the state to an EXCEPTION state.
|
void |
setStateException(Throwable t,
Date date)
Set the state to an EXCEPTION state with
the given event time.
|
public OrderedStateChanger(StateChanger<S> stateChanger, StateLock stateLock)
public void setStateException(Throwable t, Date date)
StateChanger
setStateException
in interface StateChanger<S extends State>
t
- The Exception.public void setStateException(Throwable t)
StateChanger
setStateException
in interface StateChanger<S extends State>
t
- The Exception.public void setState(S state, Date date)
StateChanger
setState
in interface StateChanger<S extends State>
public void setState(S state)
StateChanger
setState
in interface StateChanger<S extends State>