Add headers and events to serialization
- Relates to #35 - Now event headers and extended state variables are serialized with kryo and zookeeper.
This commit is contained in:
@@ -33,11 +33,11 @@ public interface StateMachinePersist<S, E, T> {
|
||||
* Write a {@link StateMachineContext} into a persistent store
|
||||
* with a context object {@code T}.
|
||||
*
|
||||
* @param contect the contect
|
||||
* @param context the context
|
||||
* @param contextOjb the context ojb
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
void write(StateMachineContext<S, E> contect, T contextOjb) throws Exception;
|
||||
void write(StateMachineContext<S, E> context, T contextOjb) throws Exception;
|
||||
|
||||
/**
|
||||
* Read a {@link StateMachineContext} from a persistent store
|
||||
|
||||
@@ -37,6 +37,15 @@ public class DefaultExtendedState implements ExtendedState {
|
||||
this.variables = new HashMap<Object, Object>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates a new default extended state.
|
||||
*
|
||||
* @param variables the variables
|
||||
*/
|
||||
public DefaultExtendedState(Map<Object, Object> variables) {
|
||||
this.variables = variables;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Object, Object> getVariables() {
|
||||
return variables;
|
||||
|
||||
Reference in New Issue
Block a user