public boolean exists(TransactionId transactionId) { return isHostedTxInProgress((TXId) transactionId) || isSuspended(transactionId) || this.localTxMap.containsKey(transactionId); }
public boolean exists(TransactionId transactionId) { return isHostedTxInProgress(transactionId) || isSuspended(transactionId); }
public Object call() throws Exception { TXManagerImpl mgr = getGemfireCache().getTxManager(); assertTrue(mgr.isHostedTxInProgress(txId)); return null; } });
public Object call() throws Exception { TXManagerImpl mgr = getGemfireCache().getTxManager(); assertFalse(mgr.isHostedTxInProgress(txId)); return null; } });
public Object call() throws Exception { TXManagerImpl mgr = getGemfireCache().getTxManager(); assertFalse(mgr.isHostedTxInProgress(txId)); TXStateInterface tx = mgr.getHostedTXState(txId); // no TXRegionStates for reads on store at READ_COMMITTED assertNull(tx); return null; } });
public Object call() throws Exception { TXManagerImpl mgr = getGemfireCache().getTxManager(); assertTrue(mgr.isHostedTxInProgress(txId)); TXStateInterface tx = mgr.getHostedTXState(txId); // 2 buckets for the two puts we did in the accessor one dist. region, // and one more bucket if Cust1 and Cust10 resolve to different buckets assertEquals("unexpected regions: " + tx.getRegions(), 2, tx.getRegions().size()); for (LocalRegion r : tx.getRegions()) { assertTrue(r instanceof BucketRegion || r instanceof DistributedRegion); TXRegionState rs = tx.readRegion(r); for (Object key : rs.getEntryKeys()) { TXEntryState es = (TXEntryState)rs.readEntry(key); assertNotNull(es.getValue(r)); assertTrue("key:"+key+" r:"+r.getFullPath(), es.isDirty()); } } return null; } });
public Object call() throws Exception { TXManagerImpl mgr = getGemfireCache().getTxManager(); assertTrue(mgr.isHostedTxInProgress(txId)); TXStateInterface tx = mgr.getHostedTXState(txId); final int n = tx.getProxy().batchingEnabled() ? 2 : 3; assertEquals("unexpected regions: " + tx.getRegions(), n, tx.getRegions().size());// 2 buckets for the two puts we // did in the accessor for (LocalRegion r : tx.getRegions()) { assertTrue(r instanceof BucketRegion || r instanceof DistributedRegion); TXRegionState rs = tx.readRegion(r); for (Object key : rs.getEntryKeys()) { TXEntryState es = (TXEntryState)rs.readEntry(key); assertNotNull(es.getValue(r)); assertTrue(es.isDirty()); } } return null; } });
public Object call() throws Exception { TXManagerImpl mgr = getGemfireCache().getTxManager(); assertTrue(mgr.isHostedTxInProgress(txId)); TXStateInterface tx = mgr.getHostedTXState(txId); final int n = tx.getProxy().batchingEnabled() ? 2 : 3; assertEquals("unexpected regions: " + tx.getRegions(), n, tx.getRegions().size());// 2 buckets for the two puts we // did in the accessor for (LocalRegion r : tx.getRegions()) { assertTrue(r instanceof BucketRegion || r instanceof DistributedRegion); TXRegionState rs = tx.readRegion(r); for (Object key : rs.getEntryKeys()) { TXEntryState es = (TXEntryState)rs.readEntry(key); assertNull(es.getValue(r)); assertTrue(es.isDirty()); } } return null; } });
public Object call() throws Exception { TXManagerImpl mgr = getGemfireCache().getTxManager(); assertTrue(mgr.isHostedTxInProgress(txId)); TXStateInterface tx = mgr.getHostedTXState(txId); final int n = tx.getProxy().batchingEnabled() ? 1 : 2; assertEquals("unexpected regions: " + tx.getRegions(), n, tx.getRegions().size());// 1 bucket for the put we // did in the accessor for (LocalRegion r : tx.getRegions()) { assertTrue(r instanceof BucketRegion || r instanceof DistributedRegion); TXRegionState rs = tx.readRegion(r); for (Object key : rs.getEntryKeys()) { TXEntryState es = (TXEntryState)rs.readEntry(key); assertNull(es.getValue(r)); assertTrue("key:" + key + " r:" + r.getFullPath(), es.isDirty()); } } return null; } });
public Object call() throws Exception { TXManagerImpl mgr = getGemfireCache().getTxManager(); assertTrue(mgr.isHostedTxInProgress(txId)); TXStateInterface tx = mgr.getHostedTXState(txId); final int n = tx.getProxy().batchingEnabled() ? 2 : 3; assertEquals("unexpected regions: " + tx.getRegions(), n, tx.getRegions().size());// 2 buckets for the two puts we // did in the accessor for (LocalRegion r : tx.getRegions()) { assertTrue(r instanceof BucketRegion || r instanceof DistributedRegion); TXRegionState rs = tx.readRegion(r); for (Object key : rs.getEntryKeys()) { TXEntryState es = (TXEntryState)rs.readEntry(key); Log.getLogWriter().warning( "SUP IS IT NULL(" + key + "):" + es.getValue(r)); assertNotNull(es.getValue(r)); assertTrue(es.isDirty()); } } return null; } });
public Object call() throws Exception { Region cust = getCache().getRegion(CUSTOMER); int hash1 = PartitionedRegionHelper.getHashKey((PartitionedRegion)cust, new CustId(1)); int hash10 = PartitionedRegionHelper.getHashKey((PartitionedRegion)cust, new CustId(10)); TXManagerImpl mgr = getGemfireCache().getTxManager(); assertTrue(mgr.isHostedTxInProgress(txId)); TXStateInterface tx = mgr.getHostedTXState(txId); // 2 buckets for the two puts we did in the accessor one dist. region, // and one more bucket if Cust1 and Cust10 resolve to different buckets assertEquals("unexpected regions: " + tx.getRegions(), 3 + (hash1 == hash10 ? 0 : 1), tx.getRegions().size()); for (LocalRegion r : tx.getRegions()) { assertTrue(r instanceof BucketRegion || r instanceof DistributedRegion); TXRegionState rs = tx.readRegion(r); for (Object key : rs.getEntryKeys()) { TXEntryState es = (TXEntryState)rs.readEntry(key); assertNotNull(es.getValue(r)); assertTrue("key:"+key+" r:"+r.getFullPath(), es.isDirty()); } } return null; } });
TXManagerImpl mgr = (TXManagerImpl) cache.getCacheTransactionManager(); reply.isHostingTx = mgr.isHostedTxInProgress(txId) || mgr.isHostedTxRecentlyCompleted(txId); if (!reply.isHostingTx) {