public class HeapSavepointStore extends Object implements SavepointStore
The life-cycle of savepoints is bound to the life-cycle of the cluster.
Constructor and Description |
---|
HeapSavepointStore()
Creates a heap-backed savepoint store.
|
Modifier and Type | Method and Description |
---|---|
void |
disposeSavepoint(String path,
ClassLoader classLoader)
Disposes the savepoint at the specified path.
|
Savepoint |
loadSavepoint(String path)
Loads the savepoint at the specified path.
|
void |
shutdown()
Shut downs the savepoint store.
|
<T extends Savepoint> |
storeSavepoint(T savepoint)
Stores the savepoint.
|
public HeapSavepointStore()
Savepoint are discarded on shutdown()
.
public <T extends Savepoint> String storeSavepoint(T savepoint) throws IOException
SavepointStore
storeSavepoint
in interface SavepointStore
T
- Savepoint typesavepoint
- Savepoint to be storedIOException
public Savepoint loadSavepoint(String path) throws IOException
SavepointStore
loadSavepoint
in interface SavepointStore
path
- Path of savepoint to loadIOException
public void disposeSavepoint(String path, ClassLoader classLoader) throws Exception
SavepointStore
The class loader is needed, because savepoints can currently point to
arbitrary snapshot StateHandle
instances, which need the user code class loader for deserialization.
disposeSavepoint
in interface SavepointStore
path
- Path of savepoint to disposeclassLoader
- Class loader for disposalException
- Failures during diposal are forwardedpublic void shutdown() throws Exception
SavepointStore
Only necessary for implementations where the savepoint life-cycle is bound to the cluster life-cycle.
shutdown
in interface SavepointStore
Exception
- Failures during shut down are forwardedCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.