public class FileStateHandle extends ByteStreamStateHandle
| Constructor and Description |
|---|
FileStateHandle(Serializable state,
String folder) |
| Modifier and Type | Method and Description |
|---|---|
static StateHandleProvider<Serializable> |
createProvider(String checkpointDir)
Creates a
StateHandleProvider for creating
FileStateHandles for a given checkpoint directory. |
void |
discardState()
Discards the state referred to by this handle, to free up resources in
the persistent storage.
|
protected InputStream |
getInputStream()
The state will be read from the stream returned by this method.
|
protected OutputStream |
getOutputStream()
The state will be written to the stream returned by this method.
|
getState, stateFetchedpublic FileStateHandle(Serializable state, String folder)
protected OutputStream getOutputStream() throws IOException, URISyntaxException
ByteStreamStateHandlegetOutputStream in class ByteStreamStateHandleIOExceptionURISyntaxExceptionprotected InputStream getInputStream() throws IOException, URISyntaxException
ByteStreamStateHandlegetInputStream in class ByteStreamStateHandleIOExceptionURISyntaxExceptionpublic void discardState()
throws Exception
StateHandleExceptionpublic static StateHandleProvider<Serializable> createProvider(String checkpointDir)
StateHandleProvider for creating
FileStateHandles for a given checkpoint directory.Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.