void clearActiveStatement(Statement stmt) { if (stmt != null) { this.sync.lock(); final StatementHolder activeStatement = this.activeStatement; if (activeStatement != null && stmt == activeStatement.stmt) { this.activeStatement = null; } this.sync.unlock(); } }
final void addDBSynchronizerMessage(final AbstractDBSynchronizerMessage dbm) { this.lock.lock(); this.dbOps.add(dbm); this.lock.unlock(); }
void setActiveStatement(StatementHolder stmtHolder) { this.sync.lock(); this.activeStatement = stmtHolder; this.sync.unlock(); }
ResultSetHolder registerResultSet(final StatementHolder stmtHolder, ResultSet rs, long cursorId) { this.sync.lock(); try { ResultSetHolder holder = stmtHolder.addResultSetNoLock(rs, cursorId); this.registeredStatements.add(stmtHolder); return holder; } finally { this.sync.unlock(); } }
public final void removePendingResultCollector( final ResultCollector<?, ?> rc) { if (rc != null) { this.lock.lock(); for (int idx = this.pendingResultCollectors.size() - 1; idx >= 0; idx--) { if (this.pendingResultCollectors.get(idx) == rc) { this.pendingResultCollectors.remove(idx); } } this.lock.unlock(); } }
final void addDBSynchronizerMessage(final AbstractDBSynchronizerMessage dbm) { this.lock.lock(); this.dbOps.add(dbm); this.lock.unlock(); }
public final void addPendingResultCollector(final ResultCollector<?, ?> rc) { if (rc != null) { this.lock.lock(); this.pendingResultCollectors.add(rc); this.lock.unlock(); } }
StatementHolder registerStatement(Statement stmt, StatementAttrs attrs, int stmtId, String preparedSQL) { StatementHolder stmtHolder; this.sync.lock(); try { stmtHolder = new StatementHolder(stmt, attrs, stmtId, preparedSQL); this.activeStatements.add(stmtHolder); } finally { this.sync.unlock(); } return stmtHolder; }
StatementHolder registerStatement(Statement stmt, StatementAttrs attrs, int stmtId, String preparedSQL) { StatementHolder stmtHolder; this.sync.lock(); try { stmtHolder = new StatementHolder(stmt, attrs, stmtId, preparedSQL); this.activeStatements.add(stmtHolder); } finally { this.sync.unlock(); } return stmtHolder; }
final TransactionException checkAvailableRegions( final InternalDistributedMember departedMember) { this.lock.lock(); try { return checkAvailableRegionCopies(departedMember); } finally { this.lock.unlock(); } }
void setStatementForReuse(EmbedStatement stmt) throws SQLException { this.sync.lock(); try { setStatementForReuseNoLock(stmt); } finally { this.sync.unlock(); } }
final void removePendingOpWithLock(final Object op) { final NonReentrantLock headLock = this.headLock; headLock.lock(); try { removePendingOp(op); } finally { headLock.unlock(); } }
void addResultSet(ResultSet rs, int cursorId) { final NonReentrantLock sync = ConnectionHolder.this.sync; sync.lock(); try { addResultSetNoLock(rs, cursorId); } finally { sync.unlock(); } }
private final void waitForPendingOpsBeforeCommit( ArrayList<TXBatchResponse> batchResponses) throws TransactionException { // release the lock before doing the wait this.lock.unlock(); try { waitForPendingOps(batchResponses, true); } finally { this.lock.lock(); } }
public final void markTXInconsistent(final Throwable t) { this.lock.lock(); markTXInconsistentNoLock(t); this.lock.unlock(); }
void setStatementForReuse(EmbedStatement stmt) throws SQLException { this.sync.lock(); try { setStatementForReuseNoLock(stmt); } finally { this.sync.unlock(); } }
ResultSetHolder addResultSet(ResultSet rs, long cursorId) { final NonReentrantLock sync = ConnectionHolder.this.sync; sync.lock(); try { return addResultSetNoLock(rs, cursorId); } finally { sync.unlock(); } }
void addResultSet(ResultSet rs, int cursorId) { final NonReentrantLock sync = ConnectionHolder.this.sync; sync.lock(); try { addResultSetNoLock(rs, cursorId); } finally { sync.unlock(); } }
private final void markPending(TXEntryState tx, byte opType, Object callbackArg) { this.headLock.lock(); try { tx.setOpType(opType, callbackArg); // mark for pending in the list so batch will be flushed at end of // message execution if required tx.updateForCommitNoLock(this, true); } finally { this.headLock.unlock(); } }
public final void lockTXState() { this.txLock.lock(); if (ExclusiveSharedSynchronizer.TRACE_LOCK_COMPACT) { final LogWriterI18n logger = getTxMgr().getLogger(); logger.info(LocalizedStrings.DEBUG, "acquired lock on " + toString()); } }