@Deprecated public abstract class AbstractMemStateSnapshot<K,N,SV,S extends State,SD extends StateDescriptor<S,?>> extends Object implements KvStateSnapshot<K,N,S,SD>, MigrationRestoreSnapshot<K,N,SV>
| Modifier and Type | Field and Description |
|---|---|
protected TypeSerializer<K> |
keySerializer
Deprecated.
Key Serializer
|
protected TypeSerializer<N> |
namespaceSerializer
Deprecated.
Namespace Serializer
|
protected SD |
stateDesc
Deprecated.
StateDescriptor, for sanity checks
|
protected TypeSerializer<SV> |
stateSerializer
Deprecated.
Serializer for the state value
|
| Constructor and Description |
|---|
AbstractMemStateSnapshot(TypeSerializer<K> keySerializer,
TypeSerializer<N> namespaceSerializer,
TypeSerializer<SV> stateSerializer,
SD stateDesc,
byte[] data)
Deprecated.
Creates a new heap memory state snapshot.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
|
StateTable<K,N,SV> |
deserialize(String stateName,
HeapKeyedStateBackend<K> stateBackend)
Deprecated.
|
void |
discardState()
Deprecated.
Discarding the heap state is a no-op.
|
byte[] |
getData()
Deprecated.
|
TypeSerializer<K> |
getKeySerializer()
Deprecated.
|
TypeSerializer<N> |
getNamespaceSerializer()
Deprecated.
|
TypeSerializer<SV> |
getStateSerializer()
Deprecated.
|
long |
getStateSize()
Deprecated.
Returns the size of the state in bytes.
|
String |
toString()
Deprecated.
|
protected final TypeSerializer<K> keySerializer
protected final TypeSerializer<N> namespaceSerializer
protected final TypeSerializer<SV> stateSerializer
protected final SD extends StateDescriptor<S,?> stateDesc
public AbstractMemStateSnapshot(TypeSerializer<K> keySerializer, TypeSerializer<N> namespaceSerializer, TypeSerializer<SV> stateSerializer, SD stateDesc, byte[] data)
keySerializer - The serializer for the keys.namespaceSerializer - The serializer for the namespace.stateSerializer - The serializer for the elements in the state HashMapstateDesc - The state identifierdata - The serialized data of the state key/value pairspublic StateTable<K,N,SV> deserialize(String stateName, HeapKeyedStateBackend<K> stateBackend) throws IOException
deserialize in interface MigrationRestoreSnapshot<K,N,SV>IOExceptionpublic void discardState()
discardState in interface StateObjectpublic long getStateSize()
StateObjectIf the the size is not known, return 0.
getStateSize in interface StateObjectpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic TypeSerializer<K> getKeySerializer()
public TypeSerializer<N> getNamespaceSerializer()
public TypeSerializer<SV> getStateSerializer()
public byte[] getData()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.