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) |
void |
createImage(MasterInfo info,
String imagePath) |
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) |
void |
setMaxLogSize(int size)
Changes the max edit log size for testing purposes
|
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
IOExceptionpublic void createImage(MasterInfo info, String imagePath) throws IOException
IOExceptionpublic 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
IOExceptionpublic void setMaxLogSize(int size)
size - Copyright © 2014. All rights reserved.