// Set writes data indexed by namespace and key. The data is written to a file
// named after the key, stored in the namespace's directory.
960427
func (store *FSMetadataStore) Set(namespace, key string, value []byte) error {
	store.Lock()
	defer store.Unlock()

	path := store.path(namespace, key)
	if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
		return err
	}
	return ioutils.AtomicWriteFile(path, value, 0644)
}
26981
func (s *Session) Set(key string, value interface{}) {
	s.set(key, value, false)
}
81906
func (md mdReadWriter) Set(key string, value string) {
	key = strings.ToLower(key)
	md[key] = []string{value}
}
1371907
func (l *ShardedNoTS) Set(tenantID, key string, val interface{}) error {
	_, ok := l.cache[tenantID]
	if !ok {
		l.cache[tenantID] = l.constructor()
		l.itemCount[tenantID] = 0
	}

	l.itemCount[tenantID]++
	return l.cache[tenantID].Set(key, val)
}
665135
func (p *DataFrame) Set(key string, val interface{}) {
	p.data[key] = val
}
70999
func (c *Context) Set(name string, value interface{}) {
	if c.data == nil {
		c.data = make(map[string]interface{})
	}
	c.data[name] = value
}
714880
func (s *PostgresStore) Set(key, value interface{}) error {
	s.lock.Lock()
	defer s.lock.Unlock()

	s.data[key] = value
	return nil
}
253136
func (d *OneToOne) Set(data GenericDataType) {
	idx := d.writeIndex % uint64(len(d.buffer))

	newBucket := &bucket{
		data: data,
		seq:  d.writeIndex,
	}
	d.writeIndex++

	atomic.StorePointer(&d.buffer[idx], unsafe.Pointer(newBucket))
}
1056457
func (m *SyncMap) Set(key string, value interface{}) {
	shard := m.locate(key)
	shard.Lock()
	shard.items[key] = value
	shard.Unlock()
}
1293165
func (env *Env) Set(name, value string) {
	if name == "" {
		panic(fmt.Sprintf("Set() can not be called with empty key for value: %q", value))
	}
	if value == "" {
		delete(env.data, name)
		return
	}
	env.data[name] = value
}
651965
func (d *OneToOne) Set(data []byte) {
	d.d.Set(gendiodes.GenericDataType(&data))
}
899110
func (j *Json) Set(key string, val interface{}) {
	m, err := j.Map()
	if err != nil {
		return
	}
	m[key] = val
}
932391
func (s *Session) Set(key string, value interface{}) {
	if s.Keys == nil {
		s.Keys = make(map[string]interface{})
	}

	s.Keys[key] = value
}
1361540
func (c *JSONConfigContainer) Set(key, val string) error {
	c.Lock()
	defer c.Unlock()
	c.data[key] = val
	return nil
}
1285703
func (s *Settings) Set(key, value string) {
	s.settings[key] = value
}
1287938
func (d *ManyToOne) Set(data []byte) {
	d.d.Set(gendiodes.GenericDataType(&data))
}
1259447
func (d *DiskStorer) Set(key, value string) error {
	if !validKey(key) {
		return errNoSession{}
	}

	filePath := path.Join(d.folderPath, key)

	d.mut.Lock()
	defer d.mut.Unlock()

	return ioutil.WriteFile(filePath, []byte(value), 0600)
}