// retrieve pulls and caches the current state entry the iterator is traversing.
// The method returns whether there are any more data left for inspection.
341390
func (it *NodeIterator) retrieve() bool {
	// Clear out any previously set values
	it.Hash = common.Hash{}

	// If the iteration's done, return no available data
	if it.state == nil {
		return false
	}
	// Otherwise retrieve the current entry
	switch {
	case it.dataIt != nil:
		it.Hash, it.Parent = it.dataIt.Hash(), it.dataIt.Parent()
		if it.Parent == (common.Hash{}) {
			it.Parent = it.accountHash
		}
	case it.code != nil:
		it.Hash, it.Parent = it.codeHash, it.accountHash
	case it.stateIt != nil:
		it.Hash, it.Parent = it.stateIt.Hash(), it.stateIt.Parent()
	}
	return true
}
1280188
func (c *MemoryStore) Get(key string) (interface{}, error) {
	item, _ := c.cache.Get(key)
	return item, nil
}
713752
func (s *Service) Retrieve(handlersendpointsv1retrieverequest *HandlersEndpointsV1RetrieveRequest) *RetrieveCall {
	c := &RetrieveCall{s: s, urlParams_: make(gensupport.URLParams)}
	c.handlersendpointsv1retrieverequest = handlersendpointsv1retrieverequest
	return c
}
276623
func (c *LruCache) Get(key string) ([]byte, bool) {
	c.mu.Lock()

	le, ok := c.cache[key]
	if !ok {
		c.mu.Unlock() // Avoiding defer overhead
		return nil, false
	}

	if c.MaxAge > 0 && le.Value.(*entry).expires <= time.Now().Unix() {
		c.deleteElement(le)
		c.maybeDeleteOldest()

		c.mu.Unlock() // Avoiding defer overhead
		return nil, false
	}

	c.lru.MoveToBack(le)
	value := le.Value.(*entry).value

	c.mu.Unlock() // Avoiding defer overhead
	return value, true
}
1201608
func (b *Backend) Get(ctx context.Context, key string) (retEntry *physical.Entry, retErr error) {
	defer metrics.MeasureSince(metricGet, time.Now())

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

	// Read
	r, err := b.client.Bucket(b.bucket).Object(key).NewReader(ctx)
	if err == storage.ErrObjectNotExist {
		return nil, nil
	}
	if err != nil {
		return nil, errwrap.Wrapf(fmt.Sprintf("failed to read value for %q: {{err}}", key), err)
	}

	defer func() {
		closeErr := r.Close()
		if closeErr != nil {
			retErr = multierror.Append(retErr, errwrap.Wrapf("error closing connection: {{err}}", closeErr))
		}
	}()

	value, err := ioutil.ReadAll(r)
	if err != nil {
		return nil, errwrap.Wrapf("failed to read value into a string: {{err}}", err)
	}

	return &physical.Entry{
		Key:   key,
		Value: value,
	}, nil
}
307299
func (s *service) Retrieve(publicId string) (resDTO rest.ResponseDTO, error *servicehelper.Error) {
	entity, err := s.repo.FindByPublicId(publicId)
	if err != nil {
		return rest.ResponseDTO{}, &servicehelper.Error{Detail: errors.New("no result found"), Code: servicehelper.NotFound}
	}
	return createDTOFromEntity(entity)
}
1110215
func (c *LedisCacher) Get(key string) interface{} {
	val, err := c.c.Get([]byte(key))
	if err != nil || len(val) == 0 {
		return nil
	}
	return string(val)
}
1309362
func (s *MemcacheStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
1090392
func (lru *TTLRUCache) Get(key interface{}) (value interface{}, foundInCache bool) {
	lru.lock.Lock()
	defer lru.lock.Unlock()

	if element, ok := lru.mapping[key]; ok {
		lru.order.MoveToFront(&element.orderelement)
		return element.val, true
	}

	return nil, false
}
588447
func (c *Cache) Get(key interface{}) (value interface{}, ok bool) {
	c.lock.Lock()
	value, ok = c.lru.Get(key)
	c.lock.Unlock()
	return value, ok
}
1165254
func (c *Cache) Get(key string) (value interface{}, ok bool) {
	c.Lock()
	defer c.Unlock()
	if it, ok := c.getItemPtr(key); ok {
		return it.Value, true
	}
	return nil, false
}
759603
func (c *Cache) Get(key Key, data ...interface{}) (interface{}, error) {
	keyStr := key.String()

	f, ok := c.m.Load(keyStr)
	if ok {
		v, err := f.(future).Get()
		if err != nil {
			return nil, err
		}
		return c.value(v, first(data))
	}

	// The key wasn't found. Attempt to add one.
	newFuture := futurevalue.New(
		func() (interface{}, error) {
			if closed := atomic.LoadInt32(&c.closed); closed == 1 {
				return nil, errors.Errorf("%s - cache is closed", c.name)
			}
			return c.initializer(key, first(data))
		},
	)

	f, loaded := c.m.LoadOrStore(keyStr, newFuture)
	if loaded {
		// Another thread has added the key before us. Return the value.
		v, err := f.(future).Get()
		if err != nil {
			return nil, err
		}
		return c.value(v, first(data))
	}

	// We added the key. It must be initialized.
	value, err := newFuture.Initialize()
	if err != nil {
		// Failed. Delete the key.
		logger.Debugf("%s - Failed to initialize key [%s]: %s. Deleting key.", c.name, keyStr, err)
		c.m.Delete(keyStr)
		return nil, err
	}
	return c.value(value, first(data))
}
759578
func (b *LRUCache) Get(key string) (v interface{}, ok bool) {
	b.lock.Lock()
	defer b.lock.Unlock()

	e := b.table[key]
	if e == nil {
		return nil, false
	}

	b.touchEntry(e)
	return e.value, true
}
1111338
func (stub *ChaincodeStub) GetQueryResult(query string) (StateQueryIteratorInterface, error) {
	// Access public data by setting the collection to empty string
	collection := ""
	// ignore QueryResponseMetadata as it is not applicable for a rich query without pagination
	iterator, _, err := stub.handleGetQueryResult(collection, query, nil)

	return iterator, err
}
1051388
func (r *PrevRevisions) Get(key string) (found bool, value datasync.KeyVal) {
	r.mu.RLock()
	prev, found := r.revisions[key]
	r.mu.RUnlock()

	return found, prev
}
38588
func (c *Cache) Get(_ context.Context, key dataloader.Key) (dataloader.Thunk, bool) {
	v, ok := c.c.Get(key.String())
	if ok {
		return v.(dataloader.Thunk), ok
	}
	return nil, ok
}
397356
func (c *LRUExpireCache) Get(key interface{}) (interface{}, bool) {
	c.lock.Lock()
	defer c.lock.Unlock()
	e, ok := c.cache.Get(key)
	if !ok {
		return nil, false
	}
	if c.clock.Now().After(e.(*cacheEntry).expireTime) {
		c.cache.Remove(key)
		return nil, false
	}
	return e.(*cacheEntry).value, true
}