// Put stores a key-value pair in this multimap.
424077
func (m *MultiMap) Put(key interface{}, value interface{}) {
	m.m[key] = append(m.m[key], value)
}
686807
func (vs *ValueMap) Put(k, v Value) {
	if vs == nil {
		panic("put on nil value map")
	}
	vs.hashMap.Put(k, v)
}
1351211
func (b *batch) Put(key, value []byte) error {
	b.b.Put(key, value)
	b.size += len(value)
	return nil
}
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
}
631329
func (s *GlobalStore) Put(addr common.Address, key []byte, data []byte) error {
	s.mu.Lock()
	defer s.mu.Unlock()

	if i, found := s.nodeKeyIndex(addr, key); !found {
		s.nodeKeys[addr] = append(s.nodeKeys[addr], nil)
		copy(s.nodeKeys[addr][i+1:], s.nodeKeys[addr][i:])
		s.nodeKeys[addr][i] = key
	}

	if i, found := s.keyNodeIndex(key, addr); !found {
		k := string(key)
		s.keyNodes[k] = append(s.keyNodes[k], addr)
		copy(s.keyNodes[k][i+1:], s.keyNodes[k][i:])
		s.keyNodes[k][i] = addr
	}

	if i, found := s.nodeIndex(addr); !found {
		s.nodes = append(s.nodes, addr)
		copy(s.nodes[i+1:], s.nodes[i:])
		s.nodes[i] = addr
	}

	if i, found := s.keyIndex(key); !found {
		s.keys = append(s.keys, nil)
		copy(s.keys[i+1:], s.keys[i:])
		s.keys[i] = key
	}

	s.data[string(key)] = data

	return nil
}
764889
func (h *HashMap) Put(k T, v T) {
	hash := h.hash(k)
	head := h.table[hash]
	for entry := head; entry != nil; entry = entry.next {
		if h.eq(entry.k, k) {
			entry.v = v
			return
		}
	}
	h.table[hash] = &hashEntry{k: k, v: v, next: head}
	h.size++
}
266395
func (m *MultiMap) PutAll(key interface{}, values []interface{}) {
	for _, value := range values {
		m.Put(key, value)
	}
}
819668
func (b *tableBatch) Put(key, value []byte) error {
	return b.batch.Put(append([]byte(b.prefix), key...), value)
}
1244700
func (c *Cursor) Put(key, val []byte, flags uint) error {
	if len(key) == 0 {
		return c.putNilKey(flags)
	}
	vn := len(val)
	if vn == 0 {
		val = []byte{0}
	}
	ret := C.lmdbgo_mdb_cursor_put2(
		c._c,
		(*C.char)(unsafe.Pointer(&key[0])), C.size_t(len(key)),
		(*C.char)(unsafe.Pointer(&val[0])), C.size_t(len(val)),
		C.uint(flags),
	)
	return operrno("mdb_cursor_put", ret)
}
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)
}
959346
func (s *storeImpl) Put(ctx datastore.Context, properties *StoredProperties) error {
	return s.ds.Put(ctx, Key(propsID), properties)
}
838744
func (pdb *protoBroker) Put(key string, value proto.Message, opts ...datasync.PutOption) error {
	return putProtoInternal(pdb.broker, pdb.serializer, key, value, opts...)
}
758479
func (w *MockSafePointKV) Put(k string, v string) error {
	w.mockLock.Lock()
	defer w.mockLock.Unlock()
	w.store[k] = v
	return nil
}
1074813
func (batch *Batch) Put(cmd string, args ...interface{}) error {
    if len(args) < 1 {
	return fmt.Errorf("Put: no key found in args")
    }

    if cmd == "MGET" || cmd == "MSET" || cmd == "MSETNX" {
	return fmt.Errorf("Put: %s not supported", cmd)
    }

    node, err := batch.cluster.getNodeByKey(args[0])
    if err != nil {
	return fmt.Errorf("Put: %v", err)
    }

    var i int
    for i = 0; i < len(batch.batches); i++ {
	if batch.batches[i].node == node {
	    batch.batches[i].cmds = append(batch.batches[i].cmds,
		nodeCommand{cmd: cmd, args: args})

	    batch.index = append(batch.index, i)
	    break
	}
    }

    if i == len(batch.batches) {
	batch.batches = append(batch.batches,
	    nodeBatch{
		node: node,
		cmds: []nodeCommand{{cmd: cmd, args: args}},
		done: make(chan int)})
	batch.index = append(batch.index, i)
    }

    return nil
}
1033595
func (k *KeyValueStringSlice) Put(key, value string) {
	for i, storedKey := range k.Keys {
		if storedKey == key {
			k.Values[i] = value
			return
		}
	}
	k.Keys = append(k.Keys, key)
	k.Values = append(k.Values, value)
}
843806
func (c *Config) Put(key string, value interface{}) (changed bool) {
	return c.PutKey(c.NewKey(key), value)
}
709373
func (p *Plugin) Put(key string, data proto.Message, opts ...datasync.PutOption) error {
	if !p.isKvEnabled() {
		return nil
	}

	if p.adapter != nil {
		return p.adapter.db.Put(key, data, opts...)
	}

	return ErrNotReady
}