public class Journal extends Object
| Constructor and Description |
|---|
Journal(String folder,
String imageFileName,
String editLogFileName)
Create a Journal manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close down the edit log
|
void |
createEditLog(long startingTransactionId)
Create an edit log.
|
void |
createImage(MasterInfo info)
Create a new image of the Master.
|
void |
createImage(MasterInfo info,
String imagePath)
Create a new image of the Master to the specified path.
|
EditLog |
getEditLog() |
long |
getImageModTimeMs()
Get image file's last modification time.
|
long |
loadEditLog(MasterInfo info)
Load edit log.
|
void |
loadImage(MasterInfo info)
Load image file.
|
void |
loadSingleLogFile(MasterInfo info,
String path)
Load one log file of the Master
|
public Journal(String folder, String imageFileName, String editLogFileName) throws IOException
folder - the folder contains image file and edit log files.imageFileName - image file nameeditLogFileName - edit file nameIOExceptionpublic void close()
public void createEditLog(long startingTransactionId)
throws IOException
startingTransactionId - the starting transaction id of the edit log.IOExceptionpublic void createImage(MasterInfo info) throws IOException
info - The Master InfoIOExceptionpublic void createImage(MasterInfo info, String imagePath) throws IOException
info - The Master InfoimagePath - The path of the image to be createdIOExceptionpublic EditLog getEditLog()
public long getImageModTimeMs()
throws IOException
IOExceptionpublic long loadEditLog(MasterInfo info) throws IOException
info - The Master Info.IOExceptionpublic void loadImage(MasterInfo info) throws IOException
info - The Master Info.IOExceptionpublic void loadSingleLogFile(MasterInfo info, String path) throws IOException
info - The Master Infopath - The path of the edit logIOExceptionCopyright © 2015. All Rights Reserved.