public class DbStateHandle<S> extends Object implements Serializable, StateHandle<S>
MySqlAdapter
defined in the DbBackendConfig
.Constructor and Description |
---|
DbStateHandle(String jobId,
long checkpointId,
long checkpointTs,
long handleId,
DbBackendConfig dbConfig,
long stateSize) |
Modifier and Type | Method and Description |
---|---|
void |
discardState()
Discards the state referred to by this handle, to free up resources in
the persistent storage.
|
protected byte[] |
getBytes() |
S |
getState(ClassLoader userCodeClassLoader)
This retrieves and return the state represented by the handle.
|
long |
getStateSize()
Returns the size of the state in bytes.
|
public DbStateHandle(String jobId, long checkpointId, long checkpointTs, long handleId, DbBackendConfig dbConfig, long stateSize)
protected byte[] getBytes() throws IOException
IOException
public void discardState()
StateHandle
discardState
in interface StateHandle<S>
public S getState(ClassLoader userCodeClassLoader) throws IOException, ClassNotFoundException
StateHandle
getState
in interface StateHandle<S>
userCodeClassLoader
- Class loader for deserializing user code specific classesIOException
ClassNotFoundException
public long getStateSize()
StateHandle
If the the size is not known, return 0
.
getStateSize
in interface StateHandle<S>
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.