Interface RedoLog
-
public interface RedoLogDefines a redo log for changes that have not been committed to disk. While nodes are added to and removed from the volatile index (held in memory) a redo log is maintained to keep track of the changes. In case the Jackrabbit process terminates unexpected the redo log is applied when Jackrabbit is restarted the next time.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidappend(MultiIndex.Action action)Appends an action to the log.voidclose()Flushes all pending writes to the redo log and closes it.voidflush()Flushes all pending writes to the redo log.List<MultiIndex.Action>getActions()Returns a List with allMultiIndex.Actioninstances in the redo log.intgetSize()Returns the number of entries in this redo log.booleanhasEntries()Returnstrueif this redo log contains any entries,falseotherwise.
-
-
-
Method Detail
-
hasEntries
boolean hasEntries()
Returnstrueif this redo log contains any entries,falseotherwise.- Returns:
trueif this redo log contains any entries,falseotherwise.
-
getSize
int getSize()
Returns the number of entries in this redo log.- Returns:
- the number of entries in this redo log.
-
getActions
List<MultiIndex.Action> getActions() throws IOException
Returns a List with allMultiIndex.Actioninstances in the redo log.- Returns:
- an List with all
MultiIndex.Actioninstances in the redo log. - Throws:
IOException- if an error occurs while reading from the redo log.
-
append
void append(MultiIndex.Action action) throws IOException
Appends an action to the log.- Parameters:
action- the action to append.- Throws:
IOException- if the node cannot be written to the redo log.
-
flush
void flush() throws IOExceptionFlushes all pending writes to the redo log.- Throws:
IOException- if an error occurs while writing.
-
close
void close() throws IOExceptionFlushes all pending writes to the redo log and closes it.- Throws:
IOException- if an error occurs while writing.
-
-