public interface SnapShot
| Modifier and Type | Method and Description |
|---|---|
void |
close()
free resources from this snapshot immediately
|
long |
deserialize(DataTree dt,
Map<Long,Integer> sessions)
deserialize a data tree from the last valid snapshot and
return the last zxid that was deserialized
|
File |
findMostRecentSnapshot()
find the most recent snapshot file
|
SnapshotInfo |
getLastSnapshotInfo()
get information of the last saved/restored snapshot
|
void |
serialize(DataTree dt,
Map<Long,Integer> sessions,
File name,
boolean fsync)
persist the datatree and the sessions into a persistence storage
|
long deserialize(DataTree dt, Map<Long,Integer> sessions) throws IOException
dt - the datatree to be deserialized intosessions - the sessions to be deserialized intoIOExceptionvoid serialize(DataTree dt, Map<Long,Integer> sessions, File name, boolean fsync) throws IOException
dt - the datatree to be serializedsessions - the session timeouts to be serializedname - the object name to store snapshot intofsync - sync the snapshot immediately after writeIOExceptionFile findMostRecentSnapshot() throws IOException
IOExceptionSnapshotInfo getLastSnapshotInfo()
void close()
throws IOException
IOExceptionCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.