// Get returns any entries that exist at the addresses provided by the
// given entries.  Entries are returned in the order in which they are
// received.  If an entry cannot be found, a nil is returned in its
// place.
188746
func (ot *orderedTree) Get(entries ...Entry) Entries {
	result := make(Entries, 0, len(entries))
	for _, entry := range entries {
		result = append(result, ot.get(entry))
	}

	return result
}
254228
func (c *rankCache) Get(id uint64) uint64 {
	c.mu.Lock()
	defer c.mu.Unlock()
	return c.entries[id]
}
1280188
func (c *MemoryStore) Get(key string) (interface{}, error) {
	item, _ := c.cache.Get(key)
	return item, nil
}
314410
func (c *Cache) Get(u interface{}) (i interface{}, err error) {

	c.Lock()
	defer c.Unlock()

	if _, ok := c.data[u]; !ok {
		return nil, errors.New("not found")
	}

	return c.data[u].value, nil
}
191992
func (c *Cache) Get(key string) (value interface{}, ok bool) {
	if c.cache == nil {
		return
	}
	if ele, hit := c.cache[key]; hit {
		c.ll.MoveToFront(ele)
		return ele.Value.(*entry).value, true
	}
	return
}
114432
func (s *GlobalStore) Get(addr common.Address, key []byte) (data []byte, err error) {
	s.mu.RLock()
	defer s.mu.RUnlock()

	if _, has := s.nodeKeyIndex(addr, key); !has {
		return nil, mock.ErrNotFound
	}

	data, ok := s.data[string(key)]
	if !ok {
		return nil, mock.ErrNotFound
	}
	return data, nil
}
65561
func (r *MemoryTTL) Get(key string) (interface{}, error) {
	r.RLock()

	for !r.isValid(key) {
		r.RUnlock()
		// Need write lock to delete key, so need to unlock, relock and recheck
		r.Lock()
		if !r.isValid(key) {
			r.delete(key)
			r.Unlock()
			return nil, ErrNotFound
		}
		r.Unlock()
		// Could become invalid again in this window
		r.RLock()
	}

	defer r.RUnlock()

	value, err := r.cache.Get(key)
	if err != nil {
		return nil, err
	}

	return value, nil
}
1091665
func (b *Backend) Get(ctx context.Context, key string) (*physical.Entry, error) {
	defer metrics.MeasureSince(metricList, time.Now())

	// Pooling
	b.permitPool.Acquire()
	defer b.permitPool.Release()

	// Read
	row, err := b.client.Single().ReadRow(ctx, b.table, spanner.Key{key}, []string{"Value"})
	if spanner.ErrCode(err) == codes.NotFound {
		return nil, nil
	}
	if err != nil {
		return nil, errwrap.Wrapf(fmt.Sprintf("failed to read value for %q: {{err}}", key), err)
	}

	var value []byte
	if err := row.Column(0, &value); err != nil {
		return nil, errwrap.Wrapf("failed to decode value into bytes: {{err}}", err)
	}

	return &physical.Entry{
		Key:   key,
		Value: value,
	}, nil
}
986710
func (m *MySQLBackend) Get(ctx context.Context, key string) (*physical.Entry, error) {
	defer metrics.MeasureSince([]string{"mysql", "get"}, time.Now())

	m.permitPool.Acquire()
	defer m.permitPool.Release()

	var result []byte
	err := m.statements["get"].QueryRow(key).Scan(&result)
	if err == sql.ErrNoRows {
		return nil, nil
	}
	if err != nil {
		return nil, err
	}

	ent := &physical.Entry{
		Key:   key,
		Value: result,
	}
	return ent, nil
}
1125893
func (c *memoryCache) Get(key string) ([]byte, error) {
	c.RLock()
	defer c.RUnlock()

	cached, ok := c.cache[key]
	if ok {
		return cached, nil
	}

	return nil, nil
}
105400
func (c *Cache) Get(ctx context.Context, key interface{}) (interface{}, bool) {
	now := clock.Now(ctx)

	// We need a Read/Write lock here because if the entry is present, we are
	// going to need to promote it "lru".
	c.lock.Lock()
	defer c.lock.Unlock()

	if e := c.cache[key]; e != nil {
		ent := e.Value.(*cacheEntry)
		if !c.isEntryExpired(now, ent) {
			c.lru.MoveToFront(e)
			return ent.v, true
		}
		c.evictEntryLocked(e)
	}

	return nil, false
}
388084
func (r *MemoryNoTS) Get(key string) (interface{}, error) {
	value, ok := r.items[key]
	if !ok {
		return nil, ErrNotFound
	}

	return value, nil
}
441781
func (lru *LRUCache) Get(key string) (v Value, ok bool) {
	lru.mu.Lock()
	defer lru.mu.Unlock()

	element := lru.table[key]
	if element == nil {
		return nil, false
	}
	lru.moveToFront(element)
	return element.Value.(*entry).value, true
}
1192500
func (xft *XFastTrie) Get(key uint64) Entry {
	// only have to check the last hashmap for the provided
	// key.
	n := xft.layers[xft.bits-1][key]
	if n == nil {
		return nil
	}

	return n.entry
}
1125866
func (l *ShardedNoTS) Get(tenantID, key string) (interface{}, error) {
	cache, ok := l.cache[tenantID]
	if !ok {
		return nil, ErrNotFound
	}

	return cache.Get(key)
}
442901
func (h *HashMap) Get(k T) (T, bool) {
	hash := h.hash(k)
	for entry := h.table[hash]; entry != nil; entry = entry.next {
		if h.eq(entry.k, k) {
			return entry.v, true
		}
	}
	return nil, false
}
154470
func (s *LDBStore) get(addr Address) (chunk Chunk, err error) {
	if s.closed {
		return nil, ErrDBClosed
	}
	proximity := s.po(addr)
	index, found := s.tryAccessIdx(addr, proximity)
	if found {
		var data []byte
		if s.getDataFunc != nil {
			// if getDataFunc is defined, use it to retrieve the chunk data
			log.Trace("ldbstore.get retrieve with getDataFunc", "key", addr)
			data, err = s.getDataFunc(addr)
			if err != nil {
				return
			}
		} else {
			// default DbStore functionality to retrieve chunk data
			datakey := getDataKey(index.Idx, proximity)
			data, err = s.db.Get(datakey)
			log.Trace("ldbstore.get retrieve", "key", addr, "indexkey", index.Idx, "datakey", fmt.Sprintf("%x", datakey), "proximity", proximity)
			if err != nil {
				log.Trace("ldbstore.get chunk found but could not be accessed", "key", addr, "err", err)
				s.deleteNow(index, getIndexKey(addr), s.po(addr))
				if err == leveldb.ErrNotFound {
					return nil, ErrChunkNotFound
				}
				return nil, err
			}
		}

		return decodeData(addr, data)
	} else {
		err = ErrChunkNotFound
	}

	return
}