org.apache.activemq.apollo.util.StateMachine
Changes to the new state only if it is still the current state.
Executes the code block only if we are still the current state.
(Since version 2.8.0) use productIterator instead