/** * @see CacheTransactionManager#begin(IsolationLevel, EnumSet) */ public final void begin(final IsolationLevel isolationLevel, final EnumSet<TransactionFlag> txFlags) { beginTX(getOrCreateTXContext(), isolationLevel, txFlags, null); }
/** * Build a new {@link TXId}, use it as part of the transaction state and * associate with the current thread using a {@link ThreadLocal}. */ public void begin() { beginTX(getOrCreateTXContext(), IsolationLevel.DEFAULT, null, null); }
final TXContext setTXState(final TXStateInterface tx) { // the thread that created the TXStateInterface may be different from the // current thread so cannot rely on the context inside the TXStateProxy final TXContext context = getOrCreateTXContext(); setTXState(tx, context); return context; }
public final boolean remoteBatching(final boolean batching) { // nothing can be done if batching is already enabled (the default) if (this.enableBatching) { return true; } return TXManagerImpl.getOrCreateTXContext().remoteBatching(batching); }
/** Build a new {@link TXId}, use it as part of the transaction * state and associate with the current thread using a {@link * ThreadLocal}. Flag the transaction to be enlisted with a JTA * Transaction. Should only be called in a context where we know * there is no existing transaction. */ public TXStateProxy beginJTA() { checkClosed(); final TXContext context = getOrCreateTXContext(); final TXId txId = TXId.newTXId(this.cache); final TXStateProxy txState = this.hostedTXStates.create(txId, txStateJTACreator, IsolationLevel.DEFAULT, null, false); context.setTXState(txState); return txState; }
public static RollbackResponse send(final InternalDistributedSystem system, final DM dm, final TXStateProxy tx, final Object callbackArg, final Set<?> recipients) { final RollbackResponse response = new RollbackResponse(system, recipients); final TXRemoteRollbackMessage msg = new TXRemoteRollbackMessage(tx, response, callbackArg); msg.setRecipients(recipients); dm.putOutgoing(msg); // if there is any pending commit from this thread then wait for it first TXManagerImpl.getOrCreateTXContext().waitForPendingCommit(); return response; }
TXManagerImpl.getOrCreateTXContext().clearTXState(); && tx != (context = TXManagerImpl.getOrCreateTXContext()) .getTXState()) { if (tx != null) { .getOrCreateTXContext(); if (GemFireXDUtils.TraceTran || GemFireXDUtils.TraceQuery) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_TRAN,
TXManagerImpl.getOrCreateTXContext().clearTXState(); && tx != (context = TXManagerImpl.getOrCreateTXContext()) .getTXState()) { if (tx != null) { .getOrCreateTXContext(); if (GemFireXDUtils.TraceTran || GemFireXDUtils.TraceQuery) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_TRAN,
TXManagerImpl.getOrCreateTXContext().clearTXState(); && tx != (context = TXManagerImpl.getOrCreateTXContext()) .getTXState()) { if (tx != null) { .getOrCreateTXContext(); if (GemFireXDUtils.TraceTran || GemFireXDUtils.TraceQuery) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_TRAN,
public final void clearActiveTXState(final boolean clearGFETX, final boolean clearIsolationLevel) { if (GemFireXDUtils.TraceTran || GemFireXDUtils.TraceQuery) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_TRAN, "GemFireTransaction#clearActiveTXState: for " + toString() + " clearing cached GFE transaction = " + clearGFETX + " with thread-local TX " + TXManagerImpl.getCurrentTXState()); } setTXState(null); if (clearGFETX) { TXManagerImpl.getOrCreateTXContext().clearTXState(); } if (clearIsolationLevel) { this.isolationLevel = IsolationLevel.NONE; } setActiveState(); }
public final void clearActiveTXState(final boolean clearGFETX, final boolean clearIsolationLevel) { if (GemFireXDUtils.TraceTran || GemFireXDUtils.TraceQuery) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_TRAN, "GemFireTransaction#clearActiveTXState: for " + toString() + " clearing cached GFE transaction = " + clearGFETX + " with thread-local TX " + TXManagerImpl.getCurrentTXState()); } setTXState(null); if (clearGFETX) { TXManagerImpl.getOrCreateTXContext().clearTXState(); } if (clearIsolationLevel) { this.isolationLevel = IsolationLevel.NONE; } setActiveState(); }
/** * Remove this TX from the hosted tx list if its empty. */ public final void removeSelfFromHostedIfEmpty(Object callbackArg) { final TXState localState = this.localTXState; // cleanup the pending SH locks, if any, before returning if (localState != null) { localState.pendingReadLocksCleanup(getLockingPolicy(), null, null); } if (!isCoordinator()) { TXManagerImpl.getOrCreateTXContext().setPendingTXId(null); if (isEmpty()) { removeSelfFromHosted(callbackArg, true); } } }
public final void clearActiveTXState(final boolean clearGFETX, final boolean clearIsolationLevel) { if (GemFireXDUtils.TraceTran || GemFireXDUtils.TraceQuery) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_TRAN, "GemFireTransaction#clearActiveTXState: for " + toString() + " clearing cached GFE transaction = " + clearGFETX + " with thread-local TX " + TXManagerImpl.getCurrentTXState()); } setTXState(null); if (clearGFETX) { TXManagerImpl.getOrCreateTXContext().clearTXState(); } if (clearIsolationLevel) { this.isolationLevel = IsolationLevel.NONE; } setActiveState(); }
final TXContext context = getOrCreateTXContext(); if (context.getTXState() != null) { throw new IllegalTransactionStateException(
TXManagerImpl txManager = tc.getTransactionManager(); TXStateProxy state = txManager.getHostedTXState(txId1); TXManagerImpl.TXContext context = TXManagerImpl.getOrCreateTXContext();
public void release() { final TXContext selfContext = getOrCreateTXContext(); TXState tx; for (TXStateProxy proxy : getHostedTransactionsInProgress()) {
TXStateInterface previousTX = null; try { context = TXManagerImpl.getOrCreateTXContext(); previousTX = context.getTXState(); txMgr.setTXState(txProxy, context);
TXStateInterface previousTX = null; try { context = TXManagerImpl.getOrCreateTXContext(); previousTX = context.getTXState(); txMgr.setTXState(txProxy, context);
public static void START_SNAPSHOT_TXID(Boolean delayRollover, String[] txid) throws SQLException, StandardException { TXManagerImpl txManager = Misc.getGemFireCache().getCacheTransactionManager(); TXManagerImpl.TXContext context = TXManagerImpl.getOrCreateTXContext();
.getOrCreateTXContext(); context.clearTXState(); final LanguageConnectionContext lcc = getLanguageConnectionContext();