public class DbLsn extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
MAX_FILE_NUM |
static long |
MAX_FILE_OFFSET |
static long |
NULL_LSN |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareTo(long lsn1,
long lsn2) |
static long |
convertIntFileOffsetToLong(int storedLsn) |
static String |
dumpString(long lsn,
int nSpaces) |
static long |
getFileNumber(long lsn)
Return the file number for this DbLsn.
|
static long |
getFileOffset(long lsn)
Return the file offset for this DbLsn.
|
static int |
getFileOffsetAsInt(long lsn) |
static long |
getNoCleaningDistance(long thisLsn,
long otherLsn,
long logFileSize)
Return the logsize in bytes between these two LSNs.
|
static String |
getNoFormatString(long lsn) |
static long |
getTrueDistance(long thisLsn,
long otherLsn,
FileManager fileManager)
Returns the number of bytes between two LSNs, counting the true size of
each intermediate file.
|
static long |
getWithCleaningDistance(long thisLsn,
long otherLsn,
long logFileSize,
FileManager fileManager)
Return the logsize in bytes between these two LSNs.
|
static boolean |
isTransient(long lsn)
A transient LSN is defined as one with a file number of MAX_FILE_NUM.
|
static boolean |
isTransientOrNull(long lsn) |
static long |
longToLsn(Long lsn) |
static long |
makeLsn(long fileNumber,
int fileOffset)
This flavor of makeLsn is used when the file offset has been stored
in 32 bits, as is done in the VLSNBucket.
|
static long |
makeLsn(long fileNumber,
long fileOffset) |
static long |
makeTransientLsn(long fileOffset)
For transient LSNs we use the MAX_FILE_NUM and the ascending sequence of
offsets.
|
static String |
toString(long lsn) |
public static final long MAX_FILE_OFFSET
public static final long MAX_FILE_NUM
public static final long NULL_LSN
public static long makeLsn(long fileNumber,
long fileOffset)
public static long makeLsn(long fileNumber,
int fileOffset)
public static long makeTransientLsn(long fileOffset)
public static boolean isTransient(long lsn)
public static boolean isTransientOrNull(long lsn)
public static long longToLsn(Long lsn)
public static long getFileNumber(long lsn)
public static long getFileOffset(long lsn)
public static int getFileOffsetAsInt(long lsn)
public static long convertIntFileOffsetToLong(int storedLsn)
public static int compareTo(long lsn1,
long lsn2)
public static String toString(long lsn)
public static String getNoFormatString(long lsn)
public static String dumpString(long lsn, int nSpaces)
public static long getNoCleaningDistance(long thisLsn,
long otherLsn,
long logFileSize)
public static long getWithCleaningDistance(long thisLsn,
long otherLsn,
long logFileSize,
FileManager fileManager)
public static long getTrueDistance(long thisLsn,
long otherLsn,
FileManager fileManager)
Copyright © 2024. All rights reserved.