// Get returns a transaction if it is contained in the pool
// and nil otherwise.
502584
func (pool *TxPool) Get(hash common.Hash) *types.Transaction {
	return pool.all.Get(hash)
}
483504
func (bp *Pool) Get(params ...interface{}) interface{} {
	res := bp.pool.Poll()
	if res == nil || (bp.IsUsable != nil && !bp.IsUsable(res, params...)) {
		// not usable, so finalize
		if res != nil && bp.Finalize != nil {
			bp.Finalize(res)
		}

		if bp.New != nil {
			res = bp.New(params...)
		}
	}

	return res
}
844567
func (self *Future) Get() (interface{}, error) {
	self.mutex.Lock()
	defer self.mutex.Unlock()
	for {
		if self.received {
			return self.val, self.err
		}
		self.cond.Wait()
	}
}
704091
func (tp *TokenPool) Get() *Token {
	if len(tp.pool) < 1 {
		return new(Token)
	}

	t := tp.pool[len(tp.pool)-1]
	tp.pool = tp.pool[:len(tp.pool)-1]
	return t
}
871625
func (u *utxoStore) Get(txHash string, txIndex uint32) (*dbtypes.UTXOData, bool) {
	u.Lock()
	defer u.Unlock()
	utxoData, ok := u.c[txHash][txIndex]
	if ok {
		u.c[txHash][txIndex] = nil
		delete(u.c[txHash], txIndex)
		if len(u.c[txHash]) == 0 {
			delete(u.c, txHash)
		}
	}
	return utxoData, ok
}
1309032
func (p *intPool) get() *big.Int {
	if p.pool.len() > 0 {
		return p.pool.pop()
	}
	return new(big.Int)
}
1149037
func (t *Transaction) Get(i interface{}, keys ...interface{}) (interface{}, error) {
	return get(t.dbmap, t, i, keys...)
}
948144
func (pool *ReaderPool) get(info *SegmentCommitInfo, create bool) *ReadersAndUpdates {
	pool.Lock() // synchronized
	defer pool.Unlock()

	assertn(info.Info.Dir == pool.owner.directory, "info.dir=%v vs %v", info.Info.Dir, pool.owner.directory)

	rld, ok := pool.readerMap[info]
	if !ok {
		if !create {
			return nil
		}
		rld = newReadersAndUpdates(pool.owner, info)
		// Steal initial reference:
		pool.readerMap[info] = rld
	} else {
		assertn(rld.info == info, "rld.info=%v info=%v isLive?= %v vs %v",
			rld.info, info, pool.infoIsLive(rld.info), pool.infoIsLive(info))
	}

	if create {
		// Return ref to caller:
		rld.incRef()
	}

	assert(pool.noDups())

	return rld
}
513004
func (p *Pool) Get() (*redis.Client, error) {
	select {
	case conn := <-p.pool:
		return conn, nil
	default:
		return p.df(p.network, p.addr)
	}
}
1334577
func (pm *poolManager) Get(name string) (*storage.Config, error) {
	settings, err := pm.settings.ReadSettings(globalKey(name))
	if err != nil {
		if errors.IsNotFound(err) {
			return nil, errors.NotFoundf("pool %q", name)
		} else {
			return nil, errors.Annotatef(err, "reading pool %q", name)
		}
	}
	return pm.configFromSettings(settings)
}
1169965
func (p *Bytes) Get(sz int) []byte {
	var c []byte
	select {
	case c = <-p.pool:
	default:
		return make([]byte, sz)
	}

	if cap(c) < sz {
		return make([]byte, sz)
	}

	return c[:sz]
}
184505
func (bp *BufferPool) Get() *bytes.Buffer {
	return bp.pool.Get().(*bytes.Buffer)
}
446377
func (tx *Tx) Get(dest interface{}, query string, args ...interface{}) error {
	return Get(tx, dest, query, args...)
}
103212
func (bp *SizedBufferPool) Get() (b *bytes.Buffer) {
	select {
	case b = <-bp.c:
	// reuse existing buffer
	default:
		// create new buffer
		b = bytes.NewBuffer(make([]byte, 0, bp.a))
	}
	return
}
16104
func (st *TxnState) Get(k kv.Key) ([]byte, error) {
	val, err := st.buf.Get(k)
	if kv.IsErrNotFound(err) {
		val, err = st.Transaction.Get(k)
		if kv.IsErrNotFound(err) {
			return nil, err
		}
	}
	if err != nil {
		return nil, err
	}
	if len(val) == 0 {
		return nil, kv.ErrNotExist
	}
	return val, nil
}
860013
func (db *DB) Get(key []byte) ([]byte, error) {
	if err := checkKeySize(key); err != nil {
		return nil, err
	}

	key = db.encodeKVKey(key)

	return db.bucket.Get(key)
}
1053571
func (l *Lock) get(ctx context.Context) (*LockRecord, error) {
	// Pooling
	l.backend.permitPool.Acquire()
	defer l.backend.permitPool.Release()

	// Read
	row, err := l.backend.client.Single().ReadRow(ctx, l.backend.haTable, spanner.Key{l.key}, []string{"Key", "Value", "Timestamp", "Identity"})
	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}}", l.key), err)
	}

	var r LockRecord
	if err := row.ToStruct(&r); err != nil {
		return nil, errwrap.Wrapf("failed to decode lock: {{err}}", err)
	}
	return &r, nil
}