@Test public void testClose() throws TTException { final IBucketWriteTrx pWtx1 = mHolder.getSession().beginBucketWtx(); assertTrue(mHolder.getSession().close()); assertFalse(mHolder.getSession().close()); assertTrue(pWtx1.isClosed()); try { mHolder.getSession().beginBucketWtx(0); fail(); } catch (IllegalStateException exc) { } }
public synchronized boolean close() throws TTException { waitForRunningCommit(); if (!mClosed) { for (final IBucketReadTrx rtx : mBucketTrxs) { if (rtx instanceof BucketWriteTrx) { ((BucketWriteTrx)rtx).clearLog(); } rtx.close(); } mLastCommittedUberBucket = null; mBucketTrxs.clear(); mResourceConfig.mBackend.close(); mDatabase.mSessions.remove(mSessionConfig.getResource()); mClosed = true; return true; } else { return false; } }
Session implements ISession { public synchronized boolean close() throws TTException { waitForRunningCommit(); if (!mClosed) { for (final IBucketReadTrx rtx : mBucketTrxs) { if (rtx instanceof BucketWriteTrx) { ((BucketWriteTrx)rtx).clearLog(); } rtx.close(); } mLastCommittedUberBucket = null; mBucketTrxs.clear(); mResourceConfig.mBackend.close(); mDatabase.mSessions.remove(mSessionConfig.getResource()); mClosed = true; return true; } else { return false; } } }
Session implements ISession { public synchronized boolean close() throws TTException { waitForRunningCommit(); if (!mClosed) { for (final IBucketReadTrx rtx : mBucketTrxs) { if (rtx instanceof BucketWriteTrx) { ((BucketWriteTrx)rtx).clearLog(); } rtx.close(); } mLastCommittedUberBucket = null; mBucketTrxs.clear(); mResourceConfig.mBackend.close(); mDatabase.mSessions.remove(mSessionConfig.getResource()); mClosed = true; return true; } else { return false; } } protected  Session(final Storage pStorage, final ResourceConfiguration pResourceConf,
        final SessionConfiguration pSessionConf, final UberBucket pBucket); }
Session implements ISession { public synchronized boolean close() throws TTException { waitForRunningCommit(); if (!mClosed) { for (final IBucketReadTrx rtx : mBucketTrxs) { if (rtx instanceof BucketWriteTrx) { ((BucketWriteTrx)rtx).clearLog(); } rtx.close(); } mLastCommittedUberBucket = null; mBucketTrxs.clear(); mResourceConfig.mBackend.close(); mDatabase.mSessions.remove(mSessionConfig.getResource()); mClosed = true; return true; } else { return false; } } 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 synchronized boolean close() throws TTException { waitForRunningCommit(); if (!mClosed) { for (final IBucketReadTrx rtx : mBucketTrxs) { if (rtx instanceof BucketWriteTrx) { ((BucketWriteTrx)rtx).clearLog(); } rtx.close(); } mLastCommittedUberBucket = null; mBucketTrxs.clear(); mResourceConfig.mBackend.close(); mDatabase.mSessions.remove(mSessionConfig.getResource()); mClosed = true; return true; } else { return false; } } 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);  }