public class VLSNBucket
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
dirty |
protected VLSN |
firstVLSN |
protected VLSN |
lastVLSN |
Constructor and Description |
---|
VLSNBucket(long fileNumber,
int stride,
int maxMappings,
int maxDistance,
VLSN firstVLSN) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
close() |
void |
dump(java.io.PrintStream out)
For debugging and tracing.
|
(package private) boolean |
empty() |
(package private) void |
fillDataEntry(DatabaseEntry data) |
(package private) boolean |
follows(VLSN vlsn) |
(package private) VLSN |
getFirst() |
(package private) long |
getGTELsn(VLSN vlsn)
Returns the mapping whose VLSN is >= the VLSN parameter.
|
(package private) VLSN |
getLast() |
(package private) long |
getLastLsn() |
long |
getLsn(VLSN vlsn) |
(package private) long |
getLTEFileNumber()
Return a file number that is less or equal to the first lsn mapped
by this bucket.
|
(package private) long |
getLTELsn(VLSN vlsn)
Returns the lsn whose VLSN is <= the VLSN parameter.
|
(package private) int |
getNumOffsets() |
(package private) boolean |
isGhost() |
(package private) boolean |
owns(VLSN vlsn) |
(package private) boolean |
precedes(VLSN vlsn) |
(package private) boolean |
put(VLSN vlsn,
long lsn)
Record the LSN location for this VLSN.
|
static VLSNBucket |
readFromDatabase(DatabaseEntry data)
Instantiate this from the database.
|
(package private) VLSNBucket |
removeFromHead(EnvironmentImpl envImpl,
VLSN lastDuplicate)
Remove the mappings from this bucket that are for VLSNs <=
lastDuplicate.
|
(package private) void |
removeFromTail(VLSN startOfDelete,
long prevLsn)
Remove the mappings from this bucket that are for VLSNs >=
startOfDelete.
|
java.lang.String |
toString() |
(package private) void |
writeToDatabase(EnvironmentImpl envImpl,
Cursor cursor)
Write this bucket to the mapping database using a cursor.
|
(package private) void |
writeToDatabase(EnvironmentImpl envImpl,
DatabaseImpl bucketDbImpl,
Txn txn)
Write this bucket to the mapping database.
|
(package private) void |
writeToTupleOutput(TupleOutput to) |
protected VLSN firstVLSN
protected VLSN lastVLSN
boolean dirty
VLSNBucket(long fileNumber, int stride, int maxMappings, int maxDistance, VLSN firstVLSN)
boolean put(VLSN vlsn, long lsn)
boolean owns(VLSN vlsn)
VLSN getFirst()
VLSN getLast()
long getLTEFileNumber()
boolean empty()
boolean follows(VLSN vlsn)
boolean precedes(VLSN vlsn)
long getGTELsn(VLSN vlsn)
long getLTELsn(VLSN vlsn)
public long getLsn(VLSN vlsn)
long getLastLsn()
VLSNBucket removeFromHead(EnvironmentImpl envImpl, VLSN lastDuplicate) throws java.io.IOException
java.io.IOException
void removeFromTail(VLSN startOfDelete, long prevLsn)
startOfDelete
- is the VLSN that begins the range to delete,
inclusiveprevLsn
- is the lsn of startOfDelete.getPrev(). We'll be using it
to cap off the end of the bucket, by assigning it to the lastLsn field.int getNumOffsets()
void close()
void writeToDatabase(EnvironmentImpl envImpl, DatabaseImpl bucketDbImpl, Txn txn)
void writeToDatabase(EnvironmentImpl envImpl, Cursor cursor)
public static VLSNBucket readFromDatabase(DatabaseEntry data)
void fillDataEntry(DatabaseEntry data)
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public void dump(java.io.PrintStream out)
boolean isGhost()
void writeToTupleOutput(TupleOutput to)
Copyright (c) 2004-2012 Oracle. All rights reserved.