|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.rep.vlsn.VLSNTracker
class VLSNTracker
See @link{VLSNIndex} for an overview of the mapping system. The VLSNTracker packages the VLSNRange and the cached, in-memory VLSNBuckets. The tracker has a notion of the "currentBucket", which is the one receiving updates. All other cached buckets are finished and are awaiting a write to the database. Those finished buckets will only be updated in special circumstances, such as log cleaning or replication stream truncation, when we can assume that there will no readers viewing the buckets.
Field Summary | |
---|---|
(package private) SortedMap<Long,VLSNBucket> |
bucketCache
|
protected VLSNRange |
range
|
Constructor Summary | |
---|---|
VLSNTracker(EnvironmentImpl envImpl,
DatabaseImpl mappingDbImpl,
int stride,
int maxMappings,
int maxDistance)
|
|
VLSNTracker(EnvironmentImpl envImpl,
int stride,
int maxMappings,
int maxDistance)
|
Method Summary | |
---|---|
(package private) void |
append(VLSNRecoveryTracker recoveryTracker)
|
(package private) void |
flushToDatabase(DatabaseImpl mappingDbImpl,
Txn txn)
Flush the tracker cache to disk. |
(package private) VLSN |
getFirstTracked()
|
(package private) VLSNBucket |
getGTEBucket(VLSN vlsn)
Return a bucket for reading a mapping for this VLSN. |
(package private) VLSN |
getLastOnDisk()
|
(package private) VLSNBucket |
getLTEBucket(VLSN vlsn)
Get the bucket which holds a mapping for this VLSN. |
(package private) VLSNRange |
getRange()
|
(package private) void |
initEmpty()
|
(package private) boolean |
isFlushedToDisk()
|
(package private) void |
merge(VLSN prunedLastOnDiskVLSN,
VLSNRecoveryTracker recoveryTracker)
Attempt to replace the mappings in this vlsnIndex for deleteStart->lastVLSN with those from the recovery mapper. |
String |
toString()
|
(package private) void |
track(VLSN vlsn,
long lsn,
byte entryTypeNum)
Record a new VLSN->LSN mapping. |
(package private) void |
truncateFromHead(VLSN deleteEnd,
long deleteFileNum)
|
(package private) void |
truncateFromTail(VLSN deleteStart,
long prevLsn)
Remove the mappings for VLSNs >= deleteStart. |
(package private) boolean |
verify(boolean verbose)
For unit test support. |
(package private) static boolean |
verifyBucketBoundaries(ArrayList<VLSN> firstVLSN,
ArrayList<VLSN> lastVLSN)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
SortedMap<Long,VLSNBucket> bucketCache
protected volatile VLSNRange range
Constructor Detail |
---|
VLSNTracker(EnvironmentImpl envImpl, DatabaseImpl mappingDbImpl, int stride, int maxMappings, int maxDistance) throws DatabaseException
DatabaseException
VLSNTracker(EnvironmentImpl envImpl, int stride, int maxMappings, int maxDistance)
Method Detail |
---|
void initEmpty()
VLSNBucket getGTEBucket(VLSN vlsn)
VLSNBucket getLTEBucket(VLSN vlsn)
void track(VLSN vlsn, long lsn, byte entryTypeNum)
void flushToDatabase(DatabaseImpl mappingDbImpl, Txn txn)
void truncateFromHead(VLSN deleteEnd, long deleteFileNum)
void truncateFromTail(VLSN deleteStart, long prevLsn)
void merge(VLSN prunedLastOnDiskVLSN, VLSNRecoveryTracker recoveryTracker)
void append(VLSNRecoveryTracker recoveryTracker)
VLSNRange getRange()
public String toString()
toString
in class Object
boolean verify(boolean verbose)
static boolean verifyBucketBoundaries(ArrayList<VLSN> firstVLSN, ArrayList<VLSN> lastVLSN)
VLSN getFirstTracked()
VLSN getLastOnDisk()
boolean isFlushedToDisk()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |