Interface RedoLog
-
public interface RedoLog
Defines 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 void
append(MultiIndex.Action action)
Appends an action to the log.void
close()
Flushes all pending writes to the redo log and closes it.void
flush()
Flushes all pending writes to the redo log.List<MultiIndex.Action>
getActions()
Returns a List with allMultiIndex.Action
instances in the redo log.int
getSize()
Returns the number of entries in this redo log.boolean
hasEntries()
Returnstrue
if this redo log contains any entries,false
otherwise.
-
-
-
Method Detail
-
hasEntries
boolean hasEntries()
Returnstrue
if this redo log contains any entries,false
otherwise.- Returns:
true
if this redo log contains any entries,false
otherwise.
-
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.Action
instances in the redo log.- Returns:
- an List with all
MultiIndex.Action
instances 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 IOException
Flushes all pending writes to the redo log.- Throws:
IOException
- if an error occurs while writing.
-
close
void close() throws IOException
Flushes all pending writes to the redo log and closes it.- Throws:
IOException
- if an error occurs while writing.
-
-