//Get from maps return the k's value
356068
func (m *SafeMap) Get(k interface{}) interface{} {
	m.lock.RLock()
	defer m.lock.RUnlock()
	if val, ok := m.bm[k]; ok {
		return val
	}
	return nil
}
393126
func (m ConcurrentMap) Get(key string) (interface{}, bool) {
	// Get shard
	shard := m.GetShard(key)
	shard.RLock()
	// Get item from shard.
	val, ok := shard.items[key]
	shard.RUnlock()
	return val, ok
}
1292560
func (c *Client) Get(key string) (val string, flags uint32, cas uint64, err error) {
	// Variants: [R] Get [Q, K, KQ]
	// Request : MUST key; MUST NOT value, extras
	// Response: MAY key, value, extras ([0..3] flags)
	return c.getCAS(key, 0)
}
811773
func (c *CMap) Get(key interface{}) (val interface{}) {
	c.mutex.RLock()
	val = c.items[key]
	c.mutex.RUnlock()
	return
}
429682
func (v *Values) Get(key Key) (value interface{}) {
	value, _ = v.GetOk(key)
	return value
}
1010968
func (env *Env) Get(key string) (value string) {
	return env.Map()[key]
}
876099
func (km *KeyManager) Get(k Key) KeyState {
	km.mutex.RLock()
	ks := km.mapper[k]
	km.mutex.RUnlock()

	return ks
}
665870
func FromMapKeys(m interface{}) interface{} {
	inValue := reflect.ValueOf(m)
	outValue := reflect.MakeSlice(reflect.SliceOf(inValue.Type().Key()), inValue.Len(), inValue.Len())
	for i, key := range inValue.MapKeys() {
		outValue.Index(i).Set(key)
	}
	return outValue.Interface()
}
466211
func (m *MapFieldTranslator) Get(id uint64) (interface{}, error) {
	m.l.RLock()
	defer m.l.RUnlock()
	if uint64(len(m.s)) < id {
		return nil, fmt.Errorf("requested unknown id in MapTranslator")
	}
	return m.s[id], nil
}
899341
func (m *SyncMap) Get(key string) (value interface{}, ok bool) {
	shard := m.locate(key)
	shard.RLock()
	value, ok = shard.items[key]
	shard.RUnlock()
	return
}
1107600
func (m *HashMap) Get(key []byte) interface{} {
	var now time.Time
	var sample bool
	if rand.Float64() < 0.1 {
		now = time.Now()
		sample = true
	}

	i := m.index(key)

	if sample {
		m.tracker.ObserveGet(time.Since(now))
	}

	if i == -1 {
		m.tracker.IncGetMiss()
		return nil
	}
	m.tracker.IncGetHit()
	return m.elems[i].value
}
849019
func (w *EtcdSafePointKV) Get(k string) (string, error) {
	ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
	resp, err := w.cli.Get(ctx, k)
	cancel()
	if err != nil {
		return "", errors.Trace(err)
	}
	if len(resp.Kvs) > 0 {
		return string(resp.Kvs[0].Value), nil
	}
	return "", nil
}
911824
func (kv *KV) Get(key []byte) (value []byte) {
	rows, err := kv.db.Query(
		fmt.Sprintf("SELECT v FROM %s WHERE id=? LIMIT 1", string(kv.table)),
		kv.id(key),
	)
	if err != nil {
		return
	}
	defer rows.Close()
	if rows.Next() {
		var s string
		err = rows.Scan(&s)
		value = gkv.Stob(s)
	}
	return
}
988564
func (m *Map) Get(key string) string {
	if m.IsEmpty() {
		return ""
	}

	hash := int(m.hash([]byte(key)))

	// Binary search for appropriate replica.
	idx := sort.Search(len(m.keys), func(i int) bool { return m.keys[i] >= hash })

	// Means we have cycled back to the first replica.
	if idx == len(m.keys) {
		idx = 0
	}

	return m.hashMap[m.keys[idx]]
}
1295332
func (m *clientConnMap) Get(dest string) (conn *grpc.ClientConn, ok bool) {
	m.RLock()
	conn, ok = m.conns[dest]
	m.RUnlock()

	return
}
390500
func (r *RedisStore) GetMap(key string) (map[string]interface{}, error) {
	values, err := r.client.HGetAll(key).Result()
	if err != nil {
		return nil, err
	}

	if len(values) == 0 {
		return nil, nil
	}

	newValues := make(map[string]interface{}, len(values))
	for k, v := range values {
		newValues[k] = v
	}

	return newValues, nil
}
668875
func (c *MemoryStore) GetMaps(keys []string) (map[string]map[string]interface{}, error) {
	values := make(map[string]map[string]interface{}, len(keys))
	for _, v := range keys {
		value, _ := c.GetMap(v)
		if value != nil {
			values[v] = value
		}
	}

	return values, nil
}