public class SavepointStore extends Object
Stored savepoints have the following format:
MagicNumber SavepointVersion Savepoint - MagicNumber => int - SavepointVersion => int (returned by Savepoint#getVersion()) - Savepoint => bytes (serialized via version-specific SavepointSerializer)
Modifier and Type | Field and Description |
---|---|
static int |
MAGIC_NUMBER
Magic number for sanity checks against stored savepoints.
|
Constructor and Description |
---|
SavepointStore() |
Modifier and Type | Method and Description |
---|---|
static Savepoint |
loadSavepoint(String path,
ClassLoader userClassLoader)
Loads the savepoint at the specified path.
|
static void |
removeSavepoint(String path)
Removes the savepoint meta data w/o loading and disposing it.
|
static <T extends Savepoint> |
storeSavepoint(String targetDirectory,
T savepoint)
Stores the savepoint.
|
public static final int MAGIC_NUMBER
public static <T extends Savepoint> String storeSavepoint(String targetDirectory, T savepoint) throws IOException
T
- Savepoint typetargetDirectory
- Target directory to store savepoint insavepoint
- Savepoint to be storedException
- Failures during store are forwardedIOException
public static Savepoint loadSavepoint(String path, ClassLoader userClassLoader) throws IOException
path
- Path of savepoint to loadException
- Failures during load are forwaredIOException
public static void removeSavepoint(String path) throws IOException
path
- Path of savepoint to removeException
- Failures during disposal are forwardedIOException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.