Package com.mckoi.store
Class JournalledSystem.JournalEntry
- java.lang.Object
-
- com.mckoi.store.JournalledSystem.JournalEntry
-
- Enclosing class:
- JournalledSystem
private static final class JournalledSystem.JournalEntry extends java.lang.ObjectA JournalEntry represents a modification that has been logging in the journal for a specific page of a resource. It contains the name of the log file, the position in the journal of the modification, and the page number.
-
-
Field Summary
Fields Modifier and Type Field Description private JournalledSystem.JournalFilejournalThe journal file.(package private) JournalledSystem.JournalEntrynext_pageThe next journal entry with the same page numberprivate longpage_numberThe page number of this modification.private longpositionThe position in the journal file.private java.lang.Stringresource_nameThe resource that this page is on.
-
Constructor Summary
Constructors Constructor Description JournalEntry(java.lang.String resource_name, JournalledSystem.JournalFile journal, long position, long page_number)Constructs the entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JournalledSystem.JournalFilegetJournalFile()Returns the journal file for this entry.longgetPageNumber()Returns the page number of this modification log entry.longgetPosition()Returns the position of the log entry in the journal file.
-
-
-
Field Detail
-
resource_name
private final java.lang.String resource_name
The resource that this page is on.
-
journal
private final JournalledSystem.JournalFile journal
The journal file.
-
position
private final long position
The position in the journal file.
-
page_number
private final long page_number
The page number of this modification.
-
next_page
JournalledSystem.JournalEntry next_page
The next journal entry with the same page number
-
-
Constructor Detail
-
JournalEntry
public JournalEntry(java.lang.String resource_name, JournalledSystem.JournalFile journal, long position, long page_number)Constructs the entry.
-
-
Method Detail
-
getJournalFile
public JournalledSystem.JournalFile getJournalFile()
Returns the journal file for this entry.
-
getPosition
public long getPosition()
Returns the position of the log entry in the journal file.
-
getPageNumber
public long getPageNumber()
Returns the page number of this modification log entry.
-
-