Returns the total number of locks held by this class.
426652
public int getTotalLockCount() {
      int count = 0;
      for (ReentrantReadWriteLock lock : sharedLocks) {
         count += lock.getReadLockCount();
         count += lock.isWriteLocked() ? 1 : 0;
      }
      return count;
   }
413328
public long getCount(E e) {
    if (counters.containsKey(e)) {
      return counters.get(e).getCount();
    } else {
      return 0l;
    }
  }
566902
public Set<Long> getLockedBlocks() {
    synchronized (mSharedMapsLock) {
      Set<Long> set = new HashSet<>();
      for (LockRecord lockRecord : mLockIdToRecordMap.values()) {
        set.add(lockRecord.getBlockId());
      }
      return set;
    }
  }
1279195
public int getCount(T style)
    {
        Integer cnt = styles.get(style);
        return cnt == null ? 0 : cnt;
    }
1070500
public int getNumberWaiting() {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            return parties - count;
        } finally {
            lock.unlock();
        }
    }
742202
public int getPropertyCount()
    {
        int count;
        if (_superClass == null)
            count = 0;
        else
            count = _superClass.getPropertyCount();

        for (AptPropertySet propertySet : _propertySets) {
            // if a property set is set to optional and hasSetters is set to false,
            // there isn't a getter or setter available for that property
            if (propertySet.hasSetters() || !propertySet.isOptional()) {
                count += propertySet.getProperties().size();
            }
        }

        count += _intfProps.size();
        return count;
    }
1359984
def count(self):
        
        total = 0
        for test in self.protocol_model.allTests():
            total += test.traceCount()*test.loopCount()*test.repCount() + test.repCount()
        return total
421076
public final long getTotalRefusalCount()
    {
        long result = 0;
        result = result + _storedItemManager.getStatistics().getTotalRefusalCount();
        result = result + _unstoredItemManager.getStatistics().getTotalRefusalCount();
        return result;
    }
1336624
public int getTopNCorrectCount() {
        if (confusion == null)
            return 0;
        if (topN <= 1) {
            int nClasses = confusion().getClasses().size();
            int countCorrect = 0;
            for (int i = 0; i < nClasses; i++) {
                countCorrect += confusion().getCount(i, i);
            }
            return countCorrect;
        }
        return topNCorrectCount;
    }
375124
def gcstats():
    
    all = gc.get_objects()
    _stats = {}

    for obj in all:
        K = type(obj)
        if K is StatsDelta:
            continue  # avoid counting ourselves

        elif K is InstanceType:  # instance of an old-style class
            K = getattr(obj, '__class__', K)

        # Track types as strings to avoid holding references
        K = str(K)

        try:
            _stats[K] += 1
        except KeyError:
            _stats[K] = 1

    # explicitly break the reference loop between the list and this frame,
    # which is contained in the list
    # This would otherwise prevent the list from being free'd
    del all

    return _stats
100417
def getResultsTotalCount(self):
        
        count = 0
        for val in self.getRawResults().values():
            count += len(val)
        return count
1079827
public void setLockCount(int valueNumber, int lockCount) {
        int index = findIndex(valueNumber);
        if (index < 0) {
            addEntry(index, valueNumber, lockCount);
        } else {
            array[index + 1] = lockCount;
        }
    }
644427
synchronized int getNonCorruptUnderReplicatedBlocksCount() {
    int size = 0;
    for (int i=0; i<QUEUE_WITH_CORRUPT_BLOCKS; i++) {
      size += priorityQueues.get(i).size();
    }
    return size;
  }
768673
protected int getNumberOfLockedMessages()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getNumberOfLockedMessages");

    int count = 0;

    synchronized(this)
    {
      LMEMessage message;

      message = firstMsg;
      while(message != null)
      {
        count++;
        message = message.next;
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getNumberOfLockedMessages", new Integer(count));
    return count;
  }
876804
private void incrementThreadLockCount()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "incrementThreadLockCount", this);
    //get the current thread
    Thread currentThread = Thread.currentThread();
    //get it's current read lock count
    LockCount count = (LockCount) readerThreads.get(currentThread);
    //if it doesn't exist, create it
    if(count == null)
    {
      count = new LockCount();
      readerThreads.put(currentThread, count);
    }
    //increment the count
    if(count.count == 0) readerThreadCount++;
    count.count++;
    readLockCount++;
    
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "incrementThreadLockCount");
  }
1033315
int getTotalCount() {
    int ret = 0; 
    for (RaidMissingBlocksPerCodec queue : queues.values()) {
      ret += queue.getTotalCount();
    }
    return ret;
  }
1310571
public LockManager getLockManager()
    {
        if (m_lockManager == null)
        {
            m_lockManager = (LockManager)ClassServiceUtility.getClassService().makeObjectFromClassName(LockManager.CLIENT_LOCK_MANAGER_CLASS);
            m_lockManager.init(this);
        }
        return m_lockManager;
    }