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 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
IOException
public void createImage(MasterInfo info, String imagePath) throws IOException
IOException
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
IOException
public void setMaxLogSize(int size)
size
- Copyright © 2014. All rights reserved.