|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.AbstractBTree
com.bigdata.btree.BTree
com.bigdata.resources.JournalIndex
public class JournalIndex
BTree mapping IJournal createTimes (long integers)
to JournalMetadata records describing the IJournal.
Note: Access to this object MUST be synchronized.
Note: This is used as a transient data structure that is populated from the
file system by the ResourceManager.
| Nested Class Summary | |
|---|---|
protected static class |
JournalIndex.TupleSerializer
Encapsulates key and value formation. |
| Nested classes/interfaces inherited from class com.bigdata.btree.BTree |
|---|
BTree.Counter, BTree.LeafCursor, BTree.NodeFactory, BTree.PartitionedCounter, BTree.Stack |
| Nested classes/interfaces inherited from class com.bigdata.btree.AbstractBTree |
|---|
AbstractBTree.IBTreeCounters |
| Field Summary |
|---|
| Fields inherited from class com.bigdata.btree.BTree |
|---|
counter, height, nentries, nleaves, nnodes, recordVersion |
| Fields inherited from class com.bigdata.btree.AbstractBTree |
|---|
branchingFactor, debug, DEBUG, dumpLog, ERROR_CLOSED, ERROR_LESS_THAN_ZERO, ERROR_READ_ONLY, ERROR_TOO_LARGE, ERROR_TRANSIENT, INFO, log, metadata, ndistinctOnWriteRetentionQueue, nodeSer, readOnly, root, store, storeCache, writeRetentionQueue |
| Fields inherited from interface com.bigdata.btree.IRangeQuery |
|---|
ALL, CURSOR, DEFAULT, DELETED, FIXED_LENGTH_SUCCESSOR, KEYS, NONE, PARALLEL, READONLY, REMOVEALL, REVERSE, VALS |
| Constructor Summary | |
|---|---|
JournalIndex(IRawStore store,
Checkpoint checkpoint,
IndexMetadata metadata,
boolean readOnly)
Load from the store. |
|
| Method Summary | |
|---|---|
void |
add(JournalMetadata resourceMetadata)
Add an entry under the commitTime associated with the JournalMetadata record. |
static JournalIndex |
createTransient()
Create a transient instance. |
JournalMetadata |
find(long timestamp)
Return the JournalMetadata identifying the journal having the
largest createTime that is less than or equal to the given timestamp. |
long |
findIndexOf(long timestamp)
Find the index of the ICommitRecord having the largest timestamp
that is less than or equal to the given timestamp. |
JournalMetadata |
findNext(long timestamp)
Find the first journal whose createTime is strictly greater than the timestamp. |
| Methods inherited from class com.bigdata.btree.BTree |
|---|
_reopen, asReadOnly, create, createTransient, createViewCheckpoint, fireDirtyEvent, getBloomFilter, getCheckpoint, getCounter, getDirtyListener, getEntryCount, getHeight, getLastCommitTime, getLeafCount, getMetadataAddr, getMutableBTree, getNodeCount, getRecordVersion, getRevisionTimestamp, getRootAddr, getSourceCount, getSources, getStore, handleCommit, load, load, needsCheckpoint, newLeafCursor, newLeafCursor, readBloomFilter, removeAll, setDirtyListener, setIndexMetadata, setLastCommitTime, writeCheckpoint, writeCheckpoint2 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JournalIndex(IRawStore store,
Checkpoint checkpoint,
IndexMetadata metadata,
boolean readOnly)
store - The backing store.checkpoint - The Checkpoint record.metadata - The metadata record for the index.| Method Detail |
|---|
public static JournalIndex createTransient()
public JournalMetadata find(long timestamp)
JournalMetadata identifying the journal having the
largest createTime that is less than or equal to the given timestamp.
This is used primarily to locate the commit record that will serve as the
ground state for a transaction having timestamp as its start
time. In this context the LTE search identifies the most recent commit
state that not later than the start time of the transaction.
timestamp - The given timestamp.
null iff there are no journals in the index that
satisify the probe.
IllegalArgumentException - if timestamp is less than or equals to ZERO (0L).public JournalMetadata findNext(long timestamp)
timestamp - The timestamp. A value of ZERO (0) may be used to find the
first journal.
null if there is no commit
record whose timestamp is strictly greater than timestamp.public long findIndexOf(long timestamp)
ICommitRecord having the largest timestamp
that is less than or equal to the given timestamp.
ICommitRecord having the largest
timestamp that is less than or equal to the given timestamp -or-
-1 iff there are no ICommitRecords
defined.public void add(JournalMetadata resourceMetadata)
JournalMetadata record.
resourceMetadata - The JournalMetadata record.
IllegalArgumentException - if commitTime is 0L.
IllegalArgumentException - if resourceMetadata is null.
IllegalArgumentException - if there is already an entry registered under for the
given timestamp.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||