// See Storage/GenericStorageOptions for documentation.
185429
func (s *GenericStorage) DeleteMulti(keys ...interface{}) error {
	if s.del == nil && s.delMulti == nil {
		return errors.Newf(
			"'%s' does not have Delete/DeleteMulti implementation",
			s.name)
	}

	s.rwMutex.Lock()
	defer s.rwMutex.Unlock()

	if s.delMulti != nil {
		return s.delMulti(keys...)
	}

	for _, key := range keys {
		if err := s.del(key); err != nil {
			return err
		}
	}
	return nil
}
121479
func (c cacheObjects) StorageInfo(ctx context.Context) (cInfo CacheStorageInfo) {
	var total, free uint64
	for _, cfs := range c.cache.cfs {
		if cfs == nil {
			continue
		}
		info, err := getDiskInfo(cfs.fsPath)
		logger.GetReqInfo(ctx).AppendTags("cachePath", cfs.fsPath)
		logger.LogIf(ctx, err)
		total += info.Total
		free += info.Free
	}
	return CacheStorageInfo{
		Total: total,
		Free:  free,
	}
}
525213
func (r *Store) Storage(ctx context.Context, name string) backend.Storage {
	_, sub, _ := r.getStore(ctx, name)
	if sub == nil || !sub.Valid() {
		return nil
	}
	return sub.Storage()
}
531804
func NewGenericKeyStore(s Storage, p notary.PassRetriever) *GenericKeyStore {
	ks := GenericKeyStore{
		store:         s,
		PassRetriever: p,
		cachedKeys:    make(map[string]*cachedKey),
		keyInfoMap:    make(keyInfoMap),
	}
	ks.loadKeyInfo()
	return &ks
}
1338637
func (a *Attachments) Storage(tag names.StorageTag) (jujuc.ContextStorageAttachment, error) {
	if attachment, ok := a.storageAttachments[tag]; ok {
		return attachment, nil
	}
	return nil, errors.NotFoundf("storage")
}
570498
func (s *GenericStorage) Set(item interface{}) error {
	if s.set == nil && s.setMulti == nil {
		return errors.Newf(
			"'%s' does not have Set/SetMulti implementation",
			s.name)
	}

	s.rwMutex.Lock()
	defer s.rwMutex.Unlock()

	if s.set != nil {
		return s.set(item)
	}
	return s.setMulti(item)
}
1325278
func (m *MockStorageV1Interface) StorageClasses() v11.StorageClassInterface {
	ret := m.ctrl.Call(m, "StorageClasses")
	ret0, _ := ret[0].(v11.StorageClassInterface)
	return ret0
}
934171
func (env *environ) StorageProvider(t storage.ProviderType) (storage.Provider, error) {
	if env.storageSupported() && t == lxdStorageProviderType {
		return &lxdStorageProvider{env}, nil
	}
	return nil, errors.NotFoundf("storage provider %q", t)
}
59885
func (m *MockInterface) StorageV1alpha1() v1alpha13.StorageV1alpha1Interface {
	ret := m.ctrl.Call(m, "StorageV1alpha1")
	ret0, _ := ret[0].(v1alpha13.StorageV1alpha1Interface)
	return ret0
}
899350
func NewLayeredStorage(s ...Storage) (Storage, error) {
	if len(s) <= 1 {
		return nil, errors.Errorf("expected multiple stores")
	}
	return layeredStorage(s), nil
}
1176545
func (s *GenericStorage) Flush() error {
	if s.errorOnFlush {
		return errors.Newf("'%s' does not support Flush", s.name)
	}

	if s.flush == nil {
		return nil
	}

	s.rwMutex.Lock()
	defer s.rwMutex.Unlock()

	return s.flush()
}
594342
func (o *OracleEnviron) StorageProviderTypes() ([]storage.ProviderType, error) {
	if access, err := o.canAccessStorageAPI(); access {
		return []storage.ProviderType{oracleStorageProviderType}, nil
	} else {
		return nil, errors.Trace(err)
	}
}
224749
func (l *b2Objects) StorageInfo(ctx context.Context) (si minio.StorageInfo) {
	return si
}
589281
func (s *StorageRuleType) SetStorageAllocatedInBytes(v int64) *StorageRuleType {
	s.StorageAllocatedInBytes = &v
	return s
}
1160656
func Store(s storage.Store) func(r *Rego) {
	return func(r *Rego) {
		r.store = s
	}
}
744391
func (m *MockZonedEnviron) StorageProviderTypes() ([]storage.ProviderType, error) {
	ret := m.ctrl.Call(m, "StorageProviderTypes")
	ret0, _ := ret[0].([]storage.ProviderType)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
796530
func (env *environ) StorageProviderTypes() ([]storage.ProviderType, error) {
	return []storage.ProviderType{storageProviderType}, nil
}