LocalPendingTransactionsTracker { public Set<GridCacheVersion> currentlyPreparedTxs() { assert stateLock.writeLock().isHeldByCurrentThread(); return U.sealSet(preparedCommittedTxsCounters.keySet()); } LocalPendingTransactionsTracker(GridCacheSharedContext<?, ?> cctx); boolean enabled(); Set<GridCacheVersion> currentlyPreparedTxs(); void startTrackingPrepared(); Set<GridCacheVersion> stopTrackingPrepared(); void startTrackingCommitted(); TrackCommittedResult stopTrackingCommitted(); Set<GridCacheVersion> startTxFinishAwaiting(
        long preparedTxsTimeout, long committingTxsTimeout); IgniteInternalFuture<Set<GridCacheVersion>> awaitPendingTxsFinished(
        Set<GridCacheVersion> globalCommittingTxs
    ); void writeLockState(); void writeUnlockState(); void onTxPrepared(GridCacheVersion nearXidVer); void onTxCommitted(GridCacheVersion nearXidVer); void onTxRolledBack(GridCacheVersion nearXidVer); void onKeysWritten(GridCacheVersion nearXidVer, List<KeyCacheObject> keys); void onKeysRead(GridCacheVersion nearXidVer, List<KeyCacheObject> keys); void reset();  }
@Test public void testCurrentlyPreparedTxs() { txPrepare(1); txKeyWrite(1, 10); txKeyWrite(1, 11); txPrepare(2); txKeyWrite(2, 20); txKeyWrite(2, 21); txKeyWrite(2, 22); txPrepare(3); txKeyWrite(3, 30); txCommit(2); tracker.writeLockState(); try { Set<GridCacheVersion> currentlyPreparedTxs = tracker.currentlyPreparedTxs(); assertEquals(2, currentlyPreparedTxs.size()); assertTrue(currentlyPreparedTxs.contains(nearXidVersion(1))); assertTrue(currentlyPreparedTxs.contains(nearXidVersion(3))); } finally { tracker.writeUnlockState(); } txKeyWrite(3, 31); txCommit(3); tracker.writeLockState(); try { Set<GridCacheVersion> currentlyPreparedTxs = tracker.currentlyPreparedTxs(); assertEquals(1, currentlyPreparedTxs.size()); assertTrue(currentlyPreparedTxs.contains(nearXidVersion(1))); } finally { tracker.writeUnlockState(); } }