Lookup the entry in the hash table and return it. First tries an optimistic read.
163892
public Entry<K,V> lookup(K key, int _hash, int _keyValue) {
    OptimisticLock[] _locks = locks;
    int si = _hash & LOCK_MASK;
    OptimisticLock l = _locks[si];
    long _stamp = l.tryOptimisticRead();
    Entry<K,V>[] tab = entries;
    if (tab == null) {
      throw new CacheClosedException(cache);
    }
    Entry<K,V> e;
    int n = tab.length;
    int _mask = n - 1;
    int idx = _hash & (_mask);
    e = tab[idx];
    while (e != null) {
      if (e.hashCode == _keyValue && keyObjIsEqual(key, e)) {
        return e;
      }
      e = e.another;
    }
    if (l.validate(_stamp)) {
      return null;
    }
    _stamp = l.readLock();
    try {
      tab = entries;
      if (tab == null) {
        throw new CacheClosedException(cache);
      }
      n = tab.length;
      _mask = n - 1;
      idx = _hash & (_mask);
      e = tab[idx];
      while (e != null) {
        if (e.hashCode == _keyValue && (keyObjIsEqual(key, e))) {
          return e;
        }
        e = e.another;
      }
      return null;
    } finally {
      l.unlockRead(_stamp);
    }
  }
734927
public int lookupIndex (long entry)
    {
        int ret = map.get(entry);
        if (ret <= 0 && !growthStopped) {
            numEntries++;
            ret = numEntries;
            map.put (entry, ret);
        }
        return ret - 1;	// feature id should be 0-based
    }
800011
public Object get(long key)
	{
		if (tc.isEntryEnabled()) Tr.entry(tc, "get", new Object[]{new Long(key), this});
		
		int hash = getHashForExistingEntry(key);
		Object value = null;
         
        if (hash >= 0)
        {
            value = _values[hash];
        }
		
		if (tc.isEntryEnabled()) Tr.exit(tc, "get", value);				
		return value;
	}
32355
def get_property(self, property_key: str) -> str:
        """"""
        self._check_object_exists()
        return DB.get_hash_value(self.key, property_key)
940759
def findentry(self, item):
        """"""
        if not isinstance(item, str):
            raise TypeError(
                'Members of this object must be strings. '
                'You supplied \"%s\"' % type(item))
        for entry in self:
            if item.lower() == entry.lower():
                return entry
        return None
1243696
def GetHashObject(self):
    """"""
    hash_object = rdf_crypto.Hash()
    hash_object.num_bytes = self._bytes_read
    for algorithm in self._hashers:
      setattr(hash_object, algorithm, self._hashers[algorithm].digest())
    return hash_object
206753
def get_hash(fName, readSize, dire=pDir()):
    
    if not fileExists(fName, dire):
        return -1
    readSize = readSize * 1024 # bytes to be read
    fName = os.path.join(dire, fName) # name coupled with path
    with open(fName, 'rb') as f:
        size = os.path.getsize(fName)
        if size < readSize * 2:
            return -1
        data = f.read(readSize)
        f.seek(-readSize, os.SEEK_END)
        data += f.read(readSize)
    return md5(data).hexdigest()
705900
def get_stored_hash(self, temp_ver):
        
        with open(self._prefixed('%s.hash' % temp_ver.name)) as f:
            return f.read().strip()
79626
private int findInsertIndex(int key, int hash) {
        int index = index(hash);
        final int maxTry = capacity;
        for (int i = 0; i < maxTry; i++) {
            if (slotIsFree(index)) return index;
            index = nextIndex(index);
        }
        throw new IllegalStateException("Free slots expected");
    }
1225521
private int hashToTable(Long id, Entry[] table) {
    int posVal = id.intValue() & Integer.MAX_VALUE;
    return (posVal % table.length);
  }
56410
@Override
    public Object get() {

        Object oObject = null;
        getCount++;

        // Check if any are free in the free hashtable
        if (lastEntry > -1) {
            // Free array has entries, get the last one.
            // remove last one for best performance
            oObject = free[lastEntry];
            free[lastEntry] = null;
            if (lastEntry == firstEntry) { // none left in pool
                lastEntry = -1;
                firstEntry = -1;
            } else if (lastEntry > 0) {
                lastEntry = lastEntry - 1;
            } else { // last entry = 0, reset to end of list
                lastEntry = poolSize - 1;
            }
        }
        if (oObject == null)
            underflowCount++;
        if (getCurrentNumElements() < minElements)
            minElements = getCurrentNumElements();
        if ((getCount + putCount) > adjustThreshold)
            adjustPoolSize();
        if (oObject == null && factory != null) {
            oObject = factory.create();
        }
        return oObject;
    }
1259613
protected HashtableEntry readEntry(long location,
                                       long previous,
                                       int retrieveMode,
                                       boolean checkExpired,
                                       int tableid)
                    throws IOException,
                    EOFException,
                    FileManagerException,
                    ClassNotFoundException,
                    HashtableOnDiskException {

        if (location == 0)
            return null;

        long next = 0;
        int hash = 0;

        initReadBuffer(location);
        next = headerin.readLong();
        hash = headerin.readInt();

        return readEntry2(location, next, hash, previous, retrieveMode, checkExpired, tableid, null, null);
    }
68833
def get_value(self,
                  entry_name: Text,
                  entry_lines: Sequence[Text]) -> Optional[Text]:
        """"""
        # Search through all lines and return the first matching one
        for line in entry_lines:
            match = self._regex.match(line)
            if match:
                return match.group(1)
        # nothing matched
        return None
211349
@SuppressWarnings("unchecked")
    static final <K,V> HashEntry<K,V> entryAt(HashEntry<K,V>[] tab, int i) {
        return (tab == null) ? null :
            (HashEntry<K,V>) UNSAFE.getObjectVolatile
            (tab, ((long)i << TSHIFT) + TBASE);
    }
383441
def lookup(outputs, key)
      out = outputs.find { |o| o.output_key == key }
      out&.output_value
    end
1018443
def _GetChunkForReading(self, chunk):
    """"""
    offset = chunk * self._HASH_SIZE
    self.index.seek(offset)

    chunk_name = self.index.read(self._HASH_SIZE)

    try:
      return self.chunk_cache.Get(chunk_name)
    except KeyError:
      pass

    # We don't have this chunk already cached. The most common read
    # access pattern is contiguous reading so since we have to go to
    # the data store already, we read ahead to reduce round trips.
    self.index.seek(offset)
    readahead = []

    for _ in range(self._READAHEAD):
      name = self.index.read(self._HASH_SIZE)
      if name and name not in self.chunk_cache:
        readahead.append(rdf_objects.BlobID.FromBytes(name))

    self._ReadChunks(readahead)
    try:
      return self.chunk_cache.Get(chunk_name)
    except KeyError:
      raise aff4.ChunkNotFoundError("Cannot open chunk %s" % chunk)
676418
@Override
    public Object get() {

        Object oObject = null;

        synchronized (this) {
            // Check if any are free in the free hashtable
            if (lastEntry > -1) {
                // Free array has entries, get the last one.
                // remove last one for best performance
                oObject = free[lastEntry];
                free[lastEntry] = null;
                if (lastEntry == firstEntry) { // none left in pool
                    lastEntry = -1;
                    firstEntry = -1;
                } else if (lastEntry > 0) {
                    lastEntry = lastEntry - 1;
                } else { // last entry = 0, reset to end of list
                    lastEntry = poolSize - 1;
                }
            }
        }
        if (oObject == null && factory != null) {
            oObject = factory.create();
        }

        return oObject;
    }