// Put inserts a key/value pair into this HashMap. If the key is already present, the existing
// value is overwritten.
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++
}
544690
func (s *Session) Put(ctx context.Context, key string, val interface{}) {
	sd := s.getSessionDataFromContext(ctx)

	sd.mu.Lock()
	sd.Values[key] = val
	sd.status = Modified
	sd.mu.Unlock()
}
294054
func (db *Database) Put(key []byte, value []byte) error {
	return db.db.Put(key, value, nil)
}
231358
func (m *MultiMap) Put(key interface{}, value interface{}) {
	set, found := m.m[key]
	if found {
		set[value] = exists
		m.m[key] = set
	} else {
		set = make(Set)
		set[value] = exists
		m.m[key] = set
	}
}
786860
func (swi *pluginStatusMap) Put(pluginName string, pluginStatus *status.PluginStatus) {
	swi.mapping.Put(pluginName, pluginStatus)
}
686807
func (vs *ValueMap) Put(k, v Value) {
	if vs == nil {
		panic("put on nil value map")
	}
	vs.hashMap.Put(k, v)
}
843806
func (c *Config) Put(key string, value interface{}) (changed bool) {
	return c.PutKey(c.NewKey(key), 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
}
819668
func (b *tableBatch) Put(key, value []byte) error {
	return b.batch.Put(append([]byte(b.prefix), key...), value)
}
753633
func (d *MapDatastore) Put(key Key, value []byte) (err error) {
	d.values[key] = value
	return nil
}
278495
func (v *Values) Put(key Key, value interface{}) (changed bool) {
	v.lock.Lock()
	defer v.lock.Unlock()

	return v.put(key, value)
}
216347
func (p *bytesSyncPublisherKafka) Put(key string, data []byte) error {
	_, err := p.conn.SendSyncMessage(p.topic, sarama.StringEncoder(key), sarama.ByteEncoder(data))
	return err
}
354625
func (p *PathMap) Put(ctx context.Context, s logical.Storage, k string, v map[string]interface{}) error {
	ps, err := p.pathStruct(ctx, s, k)
	if err != nil {
		return err
	}
	return ps.Put(ctx, s, v)
}
1295920
func Put(store string, key string, value []byte, oldVal []byte) int {

	existingVal, casIndex, ok := Get(store, key)

	if ok && !bytes.Equal(oldVal, existingVal) {
		return OUTDATED
	}

	url := CONSUL_KV_BASE_URL + store + "/" + key + "?cas=" + strconv.Itoa(casIndex)
	//glog.Infof("Updating KV pair for %s %s %s %d", url, key, value, casIndex)

	req, err := http.NewRequest("PUT", url, bytes.NewBuffer(value))

	client := &http.Client{}
	resp, err := client.Do(req)

	if err != nil {
		glog.Errorf("Error creating KV pair for %s", key)
		return ERROR
	}

	defer resp.Body.Close()

	body, _ := ioutil.ReadAll(resp.Body)

	if string(body) == "false" {
		return ERROR
	}

	return OK

}
1212131
func (kv *KV) Put(key, value []byte) error {
	return kv.db.Update(func(txn *badger.Txn) error {
		return txn.Set(key, value)
	})
}
1261000
func (batch *UpdateBatch) Put(key []byte, value []byte) {
	if value == nil {
		panic("Nil value not allowed")
	}
	batch.KVs[string(key)] = value
}
892603
func (p *DocumentMatchPool) Put(d *DocumentMatch) {
	if d == nil {
		return
	}
	// reset DocumentMatch before returning it to available pool
	d.Reset()
	p.avail = append(p.avail, d)
}