Returns the number of items currently in the queue

        :return: Integer containing size of the queue
        :exception: ConnectionError if queue is not connected
764198
def qsize(self):
        
        if not self.connected:
            raise QueueNotConnectedError("Queue is not Connected")

        try:
            size = self.__db.llen(self._key)
        except redis.ConnectionError as e:
            raise redis.ConnectionError(repr(e))
        return size
110306
def getting(self):
        
        c = Counter(self._get.copy())
        return [(n, t) for t, n in c.items()]
700260
def get_size(self):
        
        if self._size is None:
            self._size = self._filepath.stat().st_size
        return self._size
953499
int waitingThreadsCount() {
		int result = 0;
		for (final CountingLock lock : key2lock.values()) {
			result += lock.getQueueLength();
		}
		return result;
	}
1171312
def block_count(self):
        

        resp = self.call('block_count')

        for k, v in resp.items():
            resp[k] = int(v)

        return resp
15071
private void checkQueueSize() {
        int queueSize = getQueueSize();
        if (SEND_QUEUE_SIZE_WARNING_THRESHOLD > 0 && queueSize >= SEND_QUEUE_SIZE_WARNING_THRESHOLD) {
            logger.warn("The Gerrit send commands queue contains {} items!"
                    + " Something might be stuck, or your system can't process the commands fast enough."
                    + " Try to increase the number of sending worker threads."
                    + " Current thread-pool size: {}",
                    queueSize, executor.getPoolSize());
            logger.info("Nr of active pool-threads: {}", executor.getActiveCount());
        }
    }
809562
def count_(self):
        
        try:
            num = len(self.df.index)
        except Exception as e:
            self.err(e, "Can not count data")
            return
        return num
447849
def dump_queue(queue):
        
        result = []

        try:
            while True:
                item = queue.get_nowait()
                result.append(item)
        except: Empty

        return result
314760
public long getMessageCount(String queue){
        try {
            return getQueueControl(queue).getMessageCount();
        } catch (Exception e) {
            throw new AsyncException(e);
        }
    }
287770
def names(self):
        
        data = None
        if not self.connected:
            raise ConnectionError('Queue is not connected')

        try:
            data = self.rdb.keys("retaskqueue-*")
        except redis.exceptions.ConnectionError as err:
            raise ConnectionError(str(err))

        return [name[12:] for name in data]
1033315
int getTotalCount() {
    int ret = 0; 
    for (RaidMissingBlocksPerCodec queue : queues.values()) {
      ret += queue.getTotalCount();
    }
    return ret;
  }
580401
def PopItem(self):
    
    try:
      # If no timeout is specified the queue will block if empty otherwise
      # a Queue.Empty exception is raised.
      return self._queue.get(timeout=self._timeout)

    except KeyboardInterrupt:
      raise errors.QueueClose

    # If close() is called on the multiprocessing.Queue while it is blocking
    # on get() it will raise IOError.
    except IOError:
      raise errors.QueueClose

    except Queue.Empty:
      raise errors.QueueEmpty
985960
def get_objects_from_from_queues(self):
        
        _t0 = time.time()
        had_some_objects = False
        for module in self.modules_manager.get_external_instances():
            queue = module.from_q
            if not queue:
                continue
            while True:
                queue_size = queue.qsize()
                if queue_size:
                    statsmgr.gauge('queues.from.%s.count' % module.get_name(), queue_size)
                try:
                    obj = queue.get_nowait()
                except Full:
                    logger.warning("Module %s from queue is full", module.get_name())
                except Empty:
                    break
                except (IOError, EOFError) as exp:
                    logger.warning("Module %s from queue is no more available: %s",
                                   module.get_name(), str(exp))
                except Exception as exp:  # pylint: disable=broad-except
                    logger.error("An external module queue got a problem '%s'", str(exp))
                else:
                    had_some_objects = True
                    self.add(obj)
        statsmgr.timer('queues.time', time.time() - _t0)

        return had_some_objects
941820
public static int getQueuedTaskCount() {
    Thread t;
    ForkJoinPool.WorkQueue q;
    if ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread)
      q = ((ForkJoinWorkerThread) t).workQueue;
    else
      q = ForkJoinPool.commonSubmitterQueue();
    return (q == null) ? 0 : q.queueSize();
  }
185134
def _wait_for_queue_space(self, timeout=DEFAULT_WAIT_TIME):
        
        wait_time = 5

        (DEBUG and len(self.queue) > 1 * 1000 * 1000) and Log.warning("Queue {{name}} has over a million items")

        now = time()
        if timeout != None:
            time_to_stop_waiting = now + timeout
        else:
            time_to_stop_waiting = now + DEFAULT_WAIT_TIME

        if self.next_warning < now:
            self.next_warning = now + wait_time

        while not self.closed and len(self.queue) >= self.max:
            if now > time_to_stop_waiting:
                Log.error(THREAD_TIMEOUT)

            if self.silent:
                self.lock.wait(Till(till=time_to_stop_waiting))
            else:
                self.lock.wait(Till(seconds=wait_time))
                if len(self.queue) >= self.max:
                    now = time()
                    if self.next_warning < now:
                        self.next_warning = now + wait_time
                        Log.alert(
                            "Queue by name of {{name|quote}} is full with ({{num}} items), thread(s) have been waiting {{wait_time}} sec",
                            name=self.name,
                            num=len(self.queue),
                            wait_time=wait_time
                        )
247810
public int queueSize() {
        return queue.stream().map(el -> el.size).reduce(0, (l,r) -> l+r);
    }
525233
public final long getCurrentCount()
    {
        long result = 0;
        result = result + _storedItemManager.getCurrentCount();
        result = result + _unstoredItemManager.getCurrentCount();
        return result;
    }