Clear the currently active transaction (if exists). If the
        transaction stack is not empty, then a new pipeline will
        be initialized.

        :returns: No return value.
        :raises: ``ValueError`` if no transaction is active.
979155
def clear_transaction(self):
        
        with self._transaction_lock:
            local = self._transaction_local
            if not local.pipes:
                raise ValueError('No transaction is currently active.')
            local.abort()
125522
def clear(self, match="*", count=1000):
        
        cursor = '0'
        pipe = self._client.pipeline(transaction=False)
        while cursor != 0:
            cursor, keys = self.scan(cursor=cursor, match=match, count=count)
            if keys:
                pipe.delete(*keys)
        pipe.hdel(self._bucket_key, self.key_prefix)
        pipe.execute()
        return True
558235
private function resetTransactionNestingLevel(): void
    {
        if (!$this->selfReflectionNestingLevelProperty instanceof \ReflectionProperty) {
            $reflection                               = new \ts\Reflection\ReflectionClass(Connection::class);
            $this->selfReflectionNestingLevelProperty = $reflection->getProperty('transactionNestingLevel');
            $this->selfReflectionNestingLevelProperty->setAccessible(true);
        }

        $this->selfReflectionNestingLevelProperty->setValue($this, 0);
    }
1254306
def clear(self):
        
        self.database.delete(self.key)
        self.database.delete(self.event)
1344488
def rollback_transaction(self):
        
        self._assert_open()
        if not self._transaction:
            raise TransactionError("No transaction to rollback")
        cx = self._connection
        if cx:
            metadata = {}
            try:
                cx.rollback(on_success=metadata.update)
            finally:
                self._disconnect(sync=True)
                self._transaction = None
820420
def reset(self):
        
        self.command_stack = []

        self.scripts = set()
        self.watches = []
        # clean up the other instance attributes
        self.watching = False
        self.explicit_transaction = False
1172729
def reset(self):
        
        try:
            self._con.reset()
            self._transaction = False
            self._setsession()
            self._usage = 0
        except Exception:
            try:
                self.reopen()
            except Exception:
                try:
                    self.rollback()
                except Exception:
                    pass
64584
def cancel(self):
        
        self._transaction = False
        try:
            cancel = self._con.cancel
        except AttributeError:
            pass
        else:
            cancel()
796497
public void delete() {
		
		if (pendingDelete = (ongoingClientTransactions != null && !ongoingClientTransactions.isEmpty())) {
			// ongoing client txs, need those to end first
			return;
		}
		
		final DialogState currentState = wrappedDialog != null ? wrappedDialog.getState() : null;
		boolean isServerFlag = wrappedDialog != null ? wrappedDialog.isServer() : false; // is false ok, here?
		boolean stackDoesNotFiresDialogTerminatedEvent = !isEnding()
			&& !isServerFlag && (currentState == null || currentState == DialogState.TERMINATED);

		if (wrappedDialog != null) {
			wrappedDialog.delete();
		} else {
			if (tracer.isFineEnabled()) {
				tracer.fine("wrappedDialog is not set, skipping deletion.");
			}
		}
		if (stackDoesNotFiresDialogTerminatedEvent) {
			ra.processDialogTerminated(this);
		}
	}
732466
def reset(self):
        
        self.getsCounter = 0

        # dictionary of processed requests for each client. Value for each
        # client is a dictionary with request id as key and transaction id as
        # value
        self.processedRequests = {}  # type: Dict[str, Dict[int, str]]

        # dictionary of responses to be sent for each client. Value for each
        # client is an asyncio Queue
        self.responses = {}  # type: Dict[str, asyncio.Queue]

        # dictionary with key as transaction id and `Reply` as
        # value
        self.transactions = {}
745469
def _clear(self) -> None:
        
        for _, event, _, _ in self.events():
            if hasattr(event, "__self__") and isinstance(event.__self__, Process):  # type: ignore
                event.__self__.throw()                                              # type: ignore
        self._events.clear()
        self._ts_now = 0.0
799511
public void clearLockSuspending() {
      Transaction tx = null;
      try {
         // if there is an ongoing transaction we need to suspend it
         if ((tx = tm.getTransaction()) != null) {
            tm.suspend();
         }
         clearLock();
      }
      catch (Exception e) {
         log.errorSuspendingTransaction(e);
      }
      finally {
         if (tx != null) {
            try {
               tm.resume(tx);
            } catch (Exception e) {
               throw new CacheException("Unable to resume suspended transaction " + tx, e);
            }
         }
      }
   }
1212733
def MempoolCheck(self):
        
        txs = []
        values = self.MemPool.values()
        for tx in values:
            txs.append(tx)

        for tx in txs:
            res = self.RemoveTransaction(tx)
            if res:
                logger.debug("found tx 0x%s on the blockchain ...removed from mempool" % tx.Hash)
419614
def rollback(self):
        
        self._check_thread()
        if self.state not in (_STATE_ACTIVE, _STATE_PARTIAL_COMMIT):
            raise TransactionError("Transaction is not active.")
        try:
            if self.state != _STATE_PARTIAL_COMMIT:
                request = transaction_rollback_codec.encode_request(self.id, self.thread_id)
                self.client.invoker.invoke_on_connection(request, self.connection).result()
            self.state = _STATE_ROLLED_BACK
        finally:
            self._locals.transaction_exists = False
79124
def get_transaction(self, clear=False):
        
        transaction = getattr(self.thread_local, "transaction", None)
        if clear:
            self.thread_local.transaction = None
        return transaction
703119
def clear(self):
    """"""
    value = self._sum / tf.cast(self._count, self._dtype)
    with tf.control_dependencies([value]):
      reset_value = self._sum.assign(tf.zeros_like(self._sum))
      reset_count = self._count.assign(0)
    with tf.control_dependencies([reset_value, reset_count]):
      return tf.identity(value)
963270
public void reset(int initialValue) throws FetchException, PersistException {
        synchronized (mStoredSequence) {
            Transaction txn = mRepository.enterTopTransaction(null);
            txn.setForUpdate(true);
            try {
                boolean doUpdate = mStoredSequence.tryLoad();
                mStoredSequence.setInitialValue(initialValue);
                // Start as small as possible to allow signed long comparisons to work.
                mStoredSequence.setNextValue(Long.MIN_VALUE);
                if (doUpdate) {
                    mStoredSequence.update();
                } else {
                    mStoredSequence.insert();
                }
                txn.commit();
                mHasReservedValues = false;
            } finally {
                txn.exit();
            }
        }
    }