// Put appends 'put operation' of the given key/value pair to the batch.
// It is safe to modify the contents of the argument after Put returns but not
// before.
171638
func (b *Batch) Put(key, value []byte) {
	b.appendRec(keyTypeVal, key, value)
}
1271876
func (s *GlobalStore) Put(addr common.Address, key []byte, data []byte) error {
	unlock, err := s.lock(addr, key)
	if err != nil {
		return err
	}
	defer unlock()

	batch := new(leveldb.Batch)
	batch.Put(indexForHashesPerNode(addr, key), nil)
	batch.Put(indexForNodesWithHash(key, addr), nil)
	batch.Put(indexForNodes(addr), nil)
	batch.Put(indexForHashes(key), nil)
	batch.Put(indexDataKey(key), data)
	return s.db.Write(batch, nil)
}
1316786
func (kv *KV) Put(key, value []byte) error {
	return kv.db.Put(key, value, nil)
}
424077
func (m *MultiMap) Put(key interface{}, value interface{}) {
	m.m[key] = append(m.m[key], value)
}
723458
func (p *bytesManualAsyncPublisherKafka) Put(key string, data []byte) error {
	p.conn.SendAsyncMessageToPartition(p.topic, p.partition, sarama.StringEncoder(key), sarama.ByteEncoder(data), nil, p.succCallback, p.errCallback)
	return nil
}
1202517
func (m *MockStorage) Put(arg0 string, arg1 io.Reader, arg2 int64) error {
	ret := m.ctrl.Call(m, "Put", arg0, arg1, arg2)
	ret0, _ := ret[0].(error)
	return ret0
}
1178111
func (c *BufferLRU) Put(key int64, slice []byte) {
	c.mut.Lock()
	defer c.mut.Unlock()

	if c.cache == nil {
		c.actualSize = 0
		c.cache = make(map[int64]*list.Element, 1000)
		c.ll = list.New()
	}

	bufSize := FileSize(len(slice))
	if ee, ok := c.cache[key]; ok {
		oldBuf := ee.Value.(buffer)
		// in this case bufSize is a delta: new size - old size
		bufSize -= FileSize(len(oldBuf.Slice))
		c.ll.MoveToFront(ee)
		ee.Value = buffer{key, slice}
	} else {
		if bufSize > c.MaxSize {
			return
		}
		ee := c.ll.PushFront(buffer{key, slice})
		c.cache[key] = ee
	}

	c.actualSize += bufSize
	for c.actualSize > c.MaxSize {
		last := c.ll.Back()
		lastObj := last.Value.(buffer)
		lastSize := FileSize(len(lastObj.Slice))

		c.ll.Remove(last)
		delete(c.cache, lastObj.Key)
		c.actualSize -= lastSize
	}
}
1332699
func (rc *RequestConfig) PUT(path string) *RequestConfig {
	rc.Path = path
	rc.Method = "PUT"

	return rc
}
1198777
func (db *NodeSet) Put(key []byte, value []byte) error {
	db.lock.Lock()
	defer db.lock.Unlock()

	if _, ok := db.nodes[string(key)]; ok {
		return nil
	}
	keystr := string(key)

	db.nodes[keystr] = common.CopyBytes(value)
	db.order = append(db.order, keystr)
	db.dataSize += len(value)

	return nil
}
372589
func (wb *WriteBatch) Put(key, value []byte) {
	cKey := byteToChar(key)
	cValue := byteToChar(value)
	C.rocksdb_writebatch_put(wb.c, cKey, C.size_t(len(key)), cValue, C.size_t(len(value)))
}
994993
func (svc *DynamoAccessor) Put(ctx context.Context, keyPath string, object interface{}) error {

	// What's the type of the object?
	if object == nil {
		return errors.New("DynamoAccessor Put object must not be nil")
	}
	// Map it...
	marshal, marshalErr := dynamodbattribute.MarshalMap(object)
	if marshalErr != nil {
		return marshalErr
	}
	// TODO - consider using tags for this...
	_, idExists := marshal[attrID]
	if !idExists {
		marshal[attrID] = &dynamodb.AttributeValue{
			S: aws.String(keyPath),
		}
	}
	putItemInput := &dynamodb.PutItemInput{
		TableName: aws.String(svc.dynamoTableName()),
		Item:      marshal,
	}
	_, putItemErr := svc.dynamoSvc(ctx).PutItemWithContext(ctx, putItemInput)
	return putItemErr
}
125286
func (p *bytesManualSyncPublisherKafka) Put(key string, data []byte) error {
	_, err := p.conn.SendSyncMessageToPartition(p.topic, p.partition, sarama.StringEncoder(key), sarama.ByteEncoder(data))
	return err
}
103759
func (m *MockBytesPool) Put(arg0 []byte) {
	m.ctrl.Call(m, "Put", arg0)
}
775825
func (rl *MemoryReplayLog) Put(hash *HashPrefix, cltv uint32) error {
	if rl.entries == nil || rl.batches == nil {
		return errReplayLogNotStarted
	}

	_, exists := rl.entries[*hash]
	if exists {
		return ErrReplayedPacket
	}

	rl.entries[*hash] = cltv
	return nil
}
1227603
func (txn *BytesTxn) Put(key string, data []byte) keyval.BytesTxn {
	txn.access.Lock()
	defer txn.access.Unlock()

	txn.items[key] = &bytesTxnItem{data: data}

	return txn
}
703142
func (e *Echo) Put(path string, h interface{}, m ...interface{}) {
	e.add(PUT, "", path, h, m...)
}
847825
func (tx *Tx) Put(key []byte, value []byte) error {
	if tx.cellar == nil {
		return ErrTxClosed
	} else if !tx.writable {
		return ErrTxNotWritable
	}
	return tx.segmentBuilder.Put(key, value)
}