com.bigdata.journal
Class CommitRecord

java.lang.Object
  extended by com.bigdata.journal.CommitRecord
All Implemented Interfaces:
ICommitRecord

public class CommitRecord
extends Object
implements ICommitRecord

A read-only view of an ICommitRecord.

Version:
$Id: CommitRecord.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
 
Fields inherited from interface com.bigdata.journal.ICommitRecord
FIRST_USER_ROOT, MAX_ROOT_ADDRS
 
Constructor Summary
CommitRecord()
           
CommitRecord(long timestamp, long commitCounter, long[] roots)
           
 
Method Summary
 long getCommitCounter()
          The commit counter associated with the commit record.
 long getRootAddr(int index)
          The last address stored in the specified root address in this commit record.
 int getRootAddrCount()
          The #of allowed root addresses.
 long getTimestamp()
          The timestamp assigned to this commit record -or- 0L iff there is no ICommitRecord written on the Journal.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommitRecord

public CommitRecord()
TODO:
this may not be the correct commit counter unless this method is synchronized with the writeService., are commit counters global or local?

CommitRecord

public CommitRecord(long timestamp,
                    long commitCounter,
                    long[] roots)
Method Detail

getTimestamp

public final long getTimestamp()
Description copied from interface: ICommitRecord
The timestamp assigned to this commit record -or- 0L iff there is no ICommitRecord written on the Journal.

Specified by:
getTimestamp in interface ICommitRecord

getCommitCounter

public final long getCommitCounter()
Description copied from interface: ICommitRecord
The commit counter associated with the commit record. This is used by transactions in order to determine whether or not intervening commits have occurred since the transaction start time.

Specified by:
getCommitCounter in interface ICommitRecord

getRootAddrCount

public final int getRootAddrCount()
Description copied from interface: ICommitRecord
The #of allowed root addresses.

Specified by:
getRootAddrCount in interface ICommitRecord

getRootAddr

public final long getRootAddr(int index)
Description copied from interface: ICommitRecord
The last address stored in the specified root address in this commit record.

Specified by:
getRootAddr in interface ICommitRecord
Parameters:
index - The index of the root address.
Returns:
The address stored at that index.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.