public abstract class AbstractSerializer extends java.lang.Object implements StateSerializer, KernelState.ChangeListener
Modifier and Type | Field and Description |
---|---|
protected int[] |
cached |
protected KernelState |
ks |
protected NativeStateHolder[] |
nativeStateHolders |
protected VM |
vm |
Constructor and Description |
---|
AbstractSerializer() |
Modifier and Type | Method and Description |
---|---|
void |
addNativeStateHolder(NativeStateHolder nsh) |
void |
attach(VM vm) |
protected abstract int[] |
computeStoringData() |
int |
getCurrentStateVectorLength() |
int[] |
getStoringData()
serialize the current state and return as int[]
|
void |
kernelStateChanged(KernelState same) |
protected int[] cached
protected VM vm
protected KernelState ks
protected NativeStateHolder[] nativeStateHolders
public void attach(VM vm)
attach
in interface StateSerializer
public int getCurrentStateVectorLength()
public int[] getStoringData()
StateSerializer
getStoringData
in interface StateSerializer
public void kernelStateChanged(KernelState same)
kernelStateChanged
in interface KernelState.ChangeListener
public void addNativeStateHolder(NativeStateHolder nsh)
addNativeStateHolder
in interface StateSerializer
protected abstract int[] computeStoringData()