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 nameIOException
public void close()
public void createEditLog(long startingTransactionId) throws IOException
startingTransactionId
- the starting transaction id of the edit log.IOException
public void createImage(MasterInfo info) throws IOException
info
- The Master InfoIOException
public void createImage(MasterInfo info, String imagePath) throws IOException
info
- The Master InfoimagePath
- The path of the image to be createdIOException
public EditLog getEditLog()
public long getImageModTimeMs() throws IOException
IOException
public long loadEditLog(MasterInfo info) throws IOException
info
- The Master Info.IOException
public void loadImage(MasterInfo info) throws IOException
info
- The Master Info.IOException
public void loadSingleLogFile(MasterInfo info, String path) throws IOException
info
- The Master Infopath
- The path of the edit logIOException
Copyright © 2015. All Rights Reserved.