|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.journal.RootBlockView
public class RootBlockView
A view onto a root block of the Journal.
| Field Summary | |
|---|---|
static org.apache.log4j.Logger |
log
Logger. |
| Method Summary | |
|---|---|
ByteBuffer |
asReadOnlyBuffer()
A read-only buffer whose contents are the root block. |
int |
calcChecksum(ChecksumUtility checker)
Compute the checksum of the root block (excluding only the field including the checksum value itself). |
long |
getChallisField()
The "Challis field" is written at both the head and the tail of each root block and is a strictly increasing value positive long integer. |
int |
getChecksum(ChecksumUtility checker)
Return the checksum store in the root block (excluding only the field including the checksum value itself). |
long |
getCloseTime()
The timestamp assigned as the time at which writes were disallowed for the journal. |
long |
getCommitCounter()
The commit counter is a positive long integer that is strictly local to the store. |
long |
getCommitRecordAddr()
Return the address at which the ICommitRecord for this root block
is stored. |
long |
getCommitRecordIndexAddr()
The address of the root of the CommitRecordIndex. |
long |
getCreateTime()
The timestamp assigned as the creation time for the journal. |
long |
getFirstCommitTime()
The database wide timestamp of first commit on the store -or- 0L if there have been no commits. |
long |
getLastCommitTime()
The database wide timestamp of the most recent commit on the store or 0L iff there have been no commits. |
long |
getLocalTime()
A purely informative field whose value is the system local timestamp of the last commit as reported by System.currentTimeMillis() or the time at which the store was
created iff there have been no commits. |
long |
getNextOffset()
The next offset at which a data item would be written on the store. |
int |
getOffsetBits()
The #of bits in a 64-bit long integer address that are dedicated to the byte offset into the store. |
UUID |
getUUID()
The unique journal identifier |
int |
getVersion()
The root block version number. |
boolean |
isRootBlock0()
There are two root blocks and they are written in an alternating order. |
String |
toString()
|
void |
valid()
Assertion throws exception unless the root block is valid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.log4j.Logger log
| Method Detail |
|---|
public boolean isRootBlock0()
IRootBlockView
isRootBlock0 in interface IRootBlockViewpublic ByteBuffer asReadOnlyBuffer()
IRootBlockViewByteBuffer that is
returned by this method.
asReadOnlyBuffer in interface IRootBlockViewpublic int getVersion()
IRootBlockView
getVersion in interface IRootBlockViewpublic int getOffsetBits()
IRootBlockView
getOffsetBits in interface IRootBlockViewWormAddressManagerpublic long getNextOffset()
IRootBlockView
getNextOffset in interface IRootBlockViewpublic long getLocalTime()
System.currentTimeMillis() or the time at which the store was
created iff there have been no commits. Unlike
getFirstCommitTime() and getLastCommitTime() this field
does NOT provide a guarentee that time is strictly increasing.
Note: This field is stored for post-mortem purposes and is NOT used internally.
public long getFirstCommitTime()
IRootBlockView
getFirstCommitTime in interface IRootBlockViewpublic long getLastCommitTime()
IRootBlockView
getLastCommitTime in interface IRootBlockView
public long getChallisField()
throws RootBlockException
RootBlockException - if the values on the root block do not agree.public long getCommitCounter()
IRootBlockViewChallis field).
getCommitCounter in interface IRootBlockViewpublic long getCommitRecordAddr()
IRootBlockViewICommitRecord for this root block
is stored. The ICommitRecords are stored separately from the
root block so that they may be indexed by the commit timestamps. This is
necessary in order to be able to quickly recover the root addresses for a
given commit timestamp, which is a featured used to support transactional
isolation.
Note: When a logical journal may overflow onto more than one physical
journal then the address of the ICommitRecord MAY refer to a
historical physical journal and care MUST be exercised to resolve the
address against the appropriate journal file.
getCommitRecordAddr in interface IRootBlockViewICommitRecord for this root
block is stored.public long getCommitRecordIndexAddr()
IRootBlockViewCommitRecordIndex. The
CommitRecordIndex contains the ordered addresses of the
historical ICommitRecords on the Journal. The address
of the CommitRecordIndex is stored directly in the root block
rather than the ICommitRecord since we can not obtain this
address until after we have formatted and written the
ICommitRecord.
getCommitRecordIndexAddr in interface IRootBlockViewpublic void valid()
IRootBlockView
valid in interface IRootBlockViewpublic UUID getUUID()
IRootBlockView
getUUID in interface IRootBlockViewpublic long getCreateTime()
IRootBlockView
getCreateTime in interface IRootBlockViewpublic long getCloseTime()
IRootBlockView
getCloseTime in interface IRootBlockView
public int getChecksum(ChecksumUtility checker)
throws RootBlockException
checker - An object used to compute the checksum. Note that you can
disable the checksum test by passing in a null
value here.
RootBlockException - if the checksum stored in the root block does not agree
with the checksum computed by
calcChecksum(ChecksumUtility).public int calcChecksum(ChecksumUtility checker)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||