org.exist.storage.journal
Class Lsn
java.lang.Object
org.exist.storage.journal.Lsn
public class Lsn
- extends 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 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. |
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 String dump(long lsn)
Copyright (C) Wolfgang Meier. All rights reserved.