org.exist.storage.journal
Class Lsn
java.lang.Object
org.exist.storage.journal.Lsn
- public class Lsn
- extends java.lang.Object
Log Sequence Number: identifies a log record within the journal file.
A LSN is represented by a Java long and consists of the file number
of the journal file and an offset into the file.
- Author:
- wolf
Constructor Summary |
Lsn()
|
Method Summary |
static long |
create(int fileNumber,
int offset)
|
static java.lang.String |
dump(long lsn)
|
static long |
getFileNumber(long lsn)
Returns the file number encoded in the passed LSN. |
static long |
getOffset(long lsn)
Returns the file offset encoded in the passed LSN. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LSN_INVALID
public static final long LSN_INVALID
- See Also:
- Constant Field Values
Lsn
public Lsn()
create
public static long create(int fileNumber,
int offset)
getFileNumber
public static long getFileNumber(long lsn)
- Returns the file number encoded in the passed LSN.
- Parameters:
lsn
-
- Returns:
- file number
getOffset
public static long getOffset(long lsn)
- Returns the file offset encoded in the passed LSN.
- Parameters:
lsn
-
- Returns:
- file offset
dump
public static java.lang.String dump(long lsn)
Copyright (C) Wolfgang Meier. All rights reserved.