Native storage object.
9005
def native_obj(self):
        """"""
        if self.__native is None:
            self.__native = self._get_object()

        return self.__native
858329
function(next) {
      self.storage.init(function(error, collections) {
        if (error) {
          return next(error);
        }
        self.collections = collections;
        next();
      });
    }
139096
function() {
        var a  = storage.getItem(this.key)
        if (a) {
          a = JSON.parse(a)
        }
        if (a === null) storage.setItem(this.key, JSON.stringify([])) // lazy init
        return JSON.parse(storage.getItem(this.key))
      }
376257
def physical_drives(self):
        """"""
        return physical_drive.HPEPhysicalDriveCollection(
            self._conn, utils.get_subresource_path_by(
                self, ['Links', 'PhysicalDrives']),
            redfish_version=self.redfish_version)
1309077
def save_data(self, idx):
        """"""
        for name in self:
            actual = getattr(self, name)
            diskflag = getattr(self, '_%s_diskflag' % name)
            ramflag = getattr(self, '_%s_ramflag' % name)
            if diskflag:
                file_ = getattr(self, '_%s_file' % name)
                ndim = getattr(self, '_%s_ndim' % name)
                length_tot = 1
                for jdx in range(ndim):
                    length = getattr(self, '_%s_length_%s' % (name, jdx))
                    length_tot *= length
                if ndim:
                    raw = struct.pack(length_tot*'d', *actual.flatten())
                else:
                    raw = struct.pack('d', actual)
                file_.write(raw)
            elif ramflag:
                array = getattr(self, '_%s_array' % name)
                array[idx] = actual
721867
def make_native_dict_keys(d):
    """"""
    res = {}
    for k, v in d.items():  #
        k = compat.to_native(k)
        if type(v) is dict:
            v = make_native_dict_keys(v)
        res[k] = v
    return res
451929
function Storage(type) {
        type = type || DEFALUT_CORE;
        var core = cores[type];

        if (core) {
            var Storage = require('./Storage');
            var storage = new Storage(location.hostname, core, initialData);
            storages.push(storage);
            return storage;
        }
        return core;
    }
93128
def store(self, filename=None, location=None, path=None, container=None, region=None, access=None, base64decode=None):
        
        if path:
            path = '"{}"'.format(path)

        filelink_obj = self.add_transform_task('store', locals())
        response = utils.make_call(filelink_obj.url, 'get')

        if response.ok:
            data = json.loads(response.text)
            handle = re.match(r'(?:https:\/\/cdn\.filestackcontent\.com\/)(\w+)', data['url']).group(1)
            return filestack.models.Filelink(handle, apikey=self.apikey, security=self.security)
        else:
            raise Exception(response.text)
922095
private void initStorage() {
    if (this.storage != null) {
      return;
    }
    if (storageOptions == null) {
      this.storage = StorageOptions.getDefaultInstance().getService();
    } else {
      this.storage = storageOptions.getService();
    }
  }
781332
def _storage_init(self):
        
        if not self._storage.initialized:
            self._storage.init(self._module._py3_wrapper, self._is_python_2)
1270557
function MemoryAdapter(initialFiles) {
    if (!(this instanceof MemoryAdapter)) {
        return new MemoryAdapter(initialFiles);
    }

    this.entries = new Map();

    // load initial file buffers
    if (typeof initialFiles === "object" && initialFiles) {
        Object.keys(initialFiles).forEach((fileName) => {
            const buf = Buffer.from(initialFiles[fileName]);
            this.entries.set(fileName, buf);
        });
    }
}
768936
def native(self, value, context=None):
		""""""
		
		if self.strip and hasattr(value, 'strip'):
			value = value.strip()
		
		if self.none and value == '':
			return None
		
		if self.encoding and isinstance(value, bytes):
			return value.decode(self.encoding)
		
		return value
391355
function _initStorage$2(options) {
    var self = this;
    var dbInfo = {};
    if (options) {
        for (var i in options) {
            dbInfo[i] = options[i];
        }
    }

    dbInfo.keyPrefix = _getKeyPrefix(options, self._defaultConfig);

    if (!_isLocalStorageUsable()) {
        return Promise$1.reject();
    }

    self._dbInfo = dbInfo;
    dbInfo.serializer = localforageSerializer;

    return Promise$1.resolve();
}
1179067
private function storage()
    {
        $this->storage = new Storage($this->config->rootDir . DIRECTORY_SEPARATOR . $this->config->storageDir,
            $this->config->rootDir . DIRECTORY_SEPARATOR . $this->config->imagesDir,
            $this->config->rootDir . DIRECTORY_SEPARATOR . $this->config->filesDir);
    }
435167
def initialize(self):
        """"""
        if self.collname not in self.current_kv_names():
            r = self.request('post',
                             self.url+"storage/collections/config",
                             headers={'content-type': 'application/json'},
                             data={'name': self.collname})
            r.raise_for_status()
        # initialize schema
        re = self.request('post',
                          self.url+"storage/collections/config/"+self.collname,
                          headers = {'content-type': 'application/json'},
                          data=self.schema)
        re.raise_for_status()
        logger.info("initialized Splunk Key Value Collection %s with schema %s"\
                        % (self.collname, str(self.schema)))
        if self.collname not in self.current_kv_names():
            raise EnvironmentError('expected %s in list of kv collections %s' % (self.collname, str(self.current_kv_names())))
257630
function(callback) {
                var _this = this

                var initStorage = function() {
                    var obj = JSON.stringify([])
                    var _set = {}
                    _set[_this.key] = obj
                    storage.set(_set)

                    obj = JSON.parse(obj)

                    return obj
                }

                storage.get(this.key, function(items) {
                    var obj
                    if (Object.keys(items).length > 0) {
                        for (itemKey in items) {
                            obj = items[itemKey]
                            if (obj) {
                                obj = JSON.parse(obj)
                            }

                            if (obj === null || typeof obj === 'undefined') {
                                obj = initStorage()
                            } 
                            
                            if (callback) {
                                callback(obj)
                            }
                        }
                    } else {
                        obj = initStorage()
                        callback(obj)
                    }
                })
            }
677791
public static function init() {

		if(is_null(self::$storage)) {
			self::$storage = new NativeSessionStorage();
		}

		self::$storage->start();
		
	}