@Test public void testBeginBucketReadTransaction() throws TTException { final IBucketReadTrx pRtx1 = mHolder.getSession().beginBucketRtx(0); assertNotNull(pRtx1); final IBucketReadTrx pRtx2 = mHolder.getSession().beginBucketRtx(0); assertNotNull(pRtx2); assertNotSame(pRtx1, pRtx2); try { mHolder.getSession().beginBucketRtx(1); fail(); } catch (IllegalArgumentException exc) { } }
public IBucketReadTrx beginBucketRtx(final long pRevKey) throws TTException { waitForRunningCommit(); assertAccess(pRevKey); final IBackendReader bucketReader = mResourceConfig.mBackend.getReader(); final RevisionRootBucket revBucket = (RevisionRootBucket)bucketReader .read(BucketReadTrx.dereferenceLeafOfTree(bucketReader, mLastCommittedUberBucket.get() .getReferenceKeys()[IReferenceBucket.GUARANTEED_INDIRECT_OFFSET], pRevKey)[IConstants.INDIRECT_BUCKET_COUNT.length]); final MetaBucket metaBucket = (MetaBucket)bucketReader .read(revBucket.getReferenceKeys()[RevisionRootBucket.META_REFERENCE_OFFSET]); final BucketReadTrx trx = new BucketReadTrx(this, mLastCommittedUberBucket.get(), revBucket, metaBucket, bucketReader); mBucketTrxs.add(trx); return trx; }
Session implements ISession { public IBucketReadTrx beginBucketRtx(final long pRevKey) throws TTException { waitForRunningCommit(); assertAccess(pRevKey); final IBackendReader bucketReader = mResourceConfig.mBackend.getReader(); final RevisionRootBucket revBucket = (RevisionRootBucket)bucketReader .read(BucketReadTrx.dereferenceLeafOfTree(bucketReader, mLastCommittedUberBucket.get() .getReferenceKeys()[IReferenceBucket.GUARANTEED_INDIRECT_OFFSET], pRevKey)[IConstants.INDIRECT_BUCKET_COUNT.length]); final MetaBucket metaBucket = (MetaBucket)bucketReader .read(revBucket.getReferenceKeys()[RevisionRootBucket.META_REFERENCE_OFFSET]); final BucketReadTrx trx = new BucketReadTrx(this, mLastCommittedUberBucket.get(), revBucket, metaBucket, bucketReader); mBucketTrxs.add(trx); return trx; } }
Session implements ISession { public IBucketReadTrx beginBucketRtx(final long pRevKey) throws TTException { waitForRunningCommit(); assertAccess(pRevKey); final IBackendReader bucketReader = mResourceConfig.mBackend.getReader(); final RevisionRootBucket revBucket = (RevisionRootBucket)bucketReader .read(BucketReadTrx.dereferenceLeafOfTree(bucketReader, mLastCommittedUberBucket.get() .getReferenceKeys()[IReferenceBucket.GUARANTEED_INDIRECT_OFFSET], pRevKey)[IConstants.INDIRECT_BUCKET_COUNT.length]); final MetaBucket metaBucket = (MetaBucket)bucketReader .read(revBucket.getReferenceKeys()[RevisionRootBucket.META_REFERENCE_OFFSET]); final BucketReadTrx trx = new BucketReadTrx(this, mLastCommittedUberBucket.get(), revBucket, metaBucket, bucketReader); mBucketTrxs.add(trx); return trx; } protected  Session(final Storage pStorage, final ResourceConfiguration pResourceConf,
        final SessionConfiguration pSessionConf, final UberBucket pBucket); }
Session implements ISession { public IBucketReadTrx beginBucketRtx(final long pRevKey) throws TTException { waitForRunningCommit(); assertAccess(pRevKey); final IBackendReader bucketReader = mResourceConfig.mBackend.getReader(); final RevisionRootBucket revBucket = (RevisionRootBucket)bucketReader .read(BucketReadTrx.dereferenceLeafOfTree(bucketReader, mLastCommittedUberBucket.get() .getReferenceKeys()[IReferenceBucket.GUARANTEED_INDIRECT_OFFSET], pRevKey)[IConstants.INDIRECT_BUCKET_COUNT.length]); final MetaBucket metaBucket = (MetaBucket)bucketReader .read(revBucket.getReferenceKeys()[RevisionRootBucket.META_REFERENCE_OFFSET]); final BucketReadTrx trx = new BucketReadTrx(this, mLastCommittedUberBucket.get(), revBucket, metaBucket, bucketReader); mBucketTrxs.add(trx); return trx; } protected  Session(final Storage pStorage, final ResourceConfiguration pResourceConf,
        final SessionConfiguration pSessionConf, final UberBucket pBucket); IBucketReadTrx beginBucketRtx(final long pRevKey); IBucketWriteTrx beginBucketWtx(); IBucketWriteTrx beginBucketWtx(final long mRepresentRevision); synchronized boolean close(); boolean truncate(); @Override long getMostRecentVersion(); @Override ResourceConfiguration getConfig(); @Override boolean deregisterBucketTrx(IBucketReadTrx pTrx); @Override String toString(); @Override void waitForRunningCommit(); @Override void setRunningCommit(Future<Void> pRunningCommit); }
Session implements ISession { public IBucketReadTrx beginBucketRtx(final long pRevKey) throws TTException { waitForRunningCommit(); assertAccess(pRevKey); final IBackendReader bucketReader = mResourceConfig.mBackend.getReader(); final RevisionRootBucket revBucket = (RevisionRootBucket)bucketReader .read(BucketReadTrx.dereferenceLeafOfTree(bucketReader, mLastCommittedUberBucket.get() .getReferenceKeys()[IReferenceBucket.GUARANTEED_INDIRECT_OFFSET], pRevKey)[IConstants.INDIRECT_BUCKET_COUNT.length]); final MetaBucket metaBucket = (MetaBucket)bucketReader .read(revBucket.getReferenceKeys()[RevisionRootBucket.META_REFERENCE_OFFSET]); final BucketReadTrx trx = new BucketReadTrx(this, mLastCommittedUberBucket.get(), revBucket, metaBucket, bucketReader); mBucketTrxs.add(trx); return trx; } protected  Session(final Storage pStorage, final ResourceConfiguration pResourceConf,
        final SessionConfiguration pSessionConf, final UberBucket pBucket); IBucketReadTrx beginBucketRtx(final long pRevKey); IBucketWriteTrx beginBucketWtx(); IBucketWriteTrx beginBucketWtx(final long mRepresentRevision); synchronized boolean close(); boolean truncate(); @Override long getMostRecentVersion(); @Override ResourceConfiguration getConfig(); @Override boolean deregisterBucketTrx(IBucketReadTrx pTrx); @Override String toString(); @Override void waitForRunningCommit(); @Override void setRunningCommit(Future<Void> pRunningCommit);  }