@Test public void testGetData() throws TTException { DumbData[][] datas = CoreTestHelper.createTestData(mHolder); testGet(mHolder.getSession(), datas); }
public IData getData(final long pDataKey) throws TTIOException { checkArgument(pDataKey >= 0); checkState(!mClose, "Transaction already closed"); final long seqBucketKey = pDataKey >> IConstants.INDIRECT_BUCKET_COUNT[3]; final int dataBucketOffset = dataBucketOffset(pDataKey); DataBucket bucket = mCache.getIfPresent(seqBucketKey); if (bucket == null) { final List<DataBucket> listRevs = getSnapshotBuckets(seqBucketKey); final DataBucket[] revs = listRevs.toArray(new DataBucket[listRevs.size()]); checkState(revs.length > 0, "Number of Buckets to reconstruct must be larger than 0"); final IRevisioning revision = mSession.getConfig().mRevision; bucket = revision.combineBuckets(revs); mCache.put(seqBucketKey, bucket); } final IData returnVal = bucket.getData(dataBucketOffset); if (pDataKey == 0) { return returnVal; } else { return checkItemIfDeleted(returnVal); } }
BucketReadTrx implements IBucketReadTrx { public IData getData(final long pDataKey) throws TTIOException { checkArgument(pDataKey >= 0); checkState(!mClose, "Transaction already closed"); final long seqBucketKey = pDataKey >> IConstants.INDIRECT_BUCKET_COUNT[3]; final int dataBucketOffset = dataBucketOffset(pDataKey); DataBucket bucket = mCache.getIfPresent(seqBucketKey); if (bucket == null) { final List<DataBucket> listRevs = getSnapshotBuckets(seqBucketKey); final DataBucket[] revs = listRevs.toArray(new DataBucket[listRevs.size()]); checkState(revs.length > 0, "Number of Buckets to reconstruct must be larger than 0"); final IRevisioning revision = mSession.getConfig().mRevision; bucket = revision.combineBuckets(revs); mCache.put(seqBucketKey, bucket); } final IData returnVal = bucket.getData(dataBucketOffset); if (pDataKey == 0) { return returnVal; } else { return checkItemIfDeleted(returnVal); } } }
BucketReadTrx implements IBucketReadTrx { public IData getData(final long pDataKey) throws TTIOException { checkArgument(pDataKey >= 0); checkState(!mClose, "Transaction already closed"); final long seqBucketKey = pDataKey >> IConstants.INDIRECT_BUCKET_COUNT[3]; final int dataBucketOffset = dataBucketOffset(pDataKey); DataBucket bucket = mCache.getIfPresent(seqBucketKey); if (bucket == null) { final List<DataBucket> listRevs = getSnapshotBuckets(seqBucketKey); final DataBucket[] revs = listRevs.toArray(new DataBucket[listRevs.size()]); checkState(revs.length > 0, "Number of Buckets to reconstruct must be larger than 0"); final IRevisioning revision = mSession.getConfig().mRevision; bucket = revision.combineBuckets(revs); mCache.put(seqBucketKey, bucket); } final IData returnVal = bucket.getData(dataBucketOffset); if (pDataKey == 0) { return returnVal; } else { return checkItemIfDeleted(returnVal); } } protected  BucketReadTrx(final ISession pSession, final UberBucket pUberBucket,
        final RevisionRootBucket pRevBucket, final MetaBucket pMetaBucket, final IBackendReader pReader); }
BucketReadTrx implements IBucketReadTrx { public IData getData(final long pDataKey) throws TTIOException { checkArgument(pDataKey >= 0); checkState(!mClose, "Transaction already closed"); final long seqBucketKey = pDataKey >> IConstants.INDIRECT_BUCKET_COUNT[3]; final int dataBucketOffset = dataBucketOffset(pDataKey); DataBucket bucket = mCache.getIfPresent(seqBucketKey); if (bucket == null) { final List<DataBucket> listRevs = getSnapshotBuckets(seqBucketKey); final DataBucket[] revs = listRevs.toArray(new DataBucket[listRevs.size()]); checkState(revs.length > 0, "Number of Buckets to reconstruct must be larger than 0"); final IRevisioning revision = mSession.getConfig().mRevision; bucket = revision.combineBuckets(revs); mCache.put(seqBucketKey, bucket); } final IData returnVal = bucket.getData(dataBucketOffset); if (pDataKey == 0) { return returnVal; } else { return checkItemIfDeleted(returnVal); } } protected  BucketReadTrx(final ISession pSession, final UberBucket pUberBucket,
        final RevisionRootBucket pRevBucket, final MetaBucket pMetaBucket, final IBackendReader pReader); IData getData(final long pDataKey); boolean close(); long getRevision(); @Override boolean isClosed(); @Override MetaBucket getMetaBucket(); @Override String toString(); }
BucketReadTrx implements IBucketReadTrx { public IData getData(final long pDataKey) throws TTIOException { checkArgument(pDataKey >= 0); checkState(!mClose, "Transaction already closed"); final long seqBucketKey = pDataKey >> IConstants.INDIRECT_BUCKET_COUNT[3]; final int dataBucketOffset = dataBucketOffset(pDataKey); DataBucket bucket = mCache.getIfPresent(seqBucketKey); if (bucket == null) { final List<DataBucket> listRevs = getSnapshotBuckets(seqBucketKey); final DataBucket[] revs = listRevs.toArray(new DataBucket[listRevs.size()]); checkState(revs.length > 0, "Number of Buckets to reconstruct must be larger than 0"); final IRevisioning revision = mSession.getConfig().mRevision; bucket = revision.combineBuckets(revs); mCache.put(seqBucketKey, bucket); } final IData returnVal = bucket.getData(dataBucketOffset); if (pDataKey == 0) { return returnVal; } else { return checkItemIfDeleted(returnVal); } } protected  BucketReadTrx(final ISession pSession, final UberBucket pUberBucket,
        final RevisionRootBucket pRevBucket, final MetaBucket pMetaBucket, final IBackendReader pReader); IData getData(final long pDataKey); boolean close(); long getRevision(); @Override boolean isClosed(); @Override MetaBucket getMetaBucket(); @Override String toString();  }