static fallback() {
    if (!_storageMethod) {
      Logger.info('No Storage method set yet.');
      return;
    }

    if (_storageMethod instanceof SMMemoryObject) {
      Logger.error(
        'Storage is already using in-memory object. Cannot fall back.'
      );
      return;
    }

    Logger.info('Storage error. Falling back to in-memory object.');

    let oldStorageMethod = _storageMethod,
      items = oldStorageMethod.findItems(_storagePrefix);

    _storageMethod = new SMMemoryObject();

    items.forEach(key => {
      _storageMethod.setItem(key, oldStorageMethod.getItem(key));
      oldStorageMethod.removeItem(key);
    });
  }
/**
   * Falls back to in-memory storage if the previous storage method fails
   *
   * @returns {void}
   */
Falls back to in-memory storage if the previous storage method fails
@returns {void}
Falls back to in - memory storage if the previous storage method fails @returns { void }
static fallback() {
    if (!_storageMethod) {
      Logger.info('No Storage method set yet.');
      return;
    }
    if (_storageMethod instanceof SMMemoryObject) {
      Logger.error(
        'Storage is already using in-memory object. Cannot fall back.'
      );
      return;
    }
    Logger.info('Storage error. Falling back to in-memory object.');
    let oldStorageMethod = _storageMethod,
      items = oldStorageMethod.findItems(_storagePrefix);
    _storageMethod = new SMMemoryObject();
    items.forEach(key => {
      _storageMethod.setItem(key, oldStorageMethod.getItem(key));
      oldStorageMethod.removeItem(key);
    });
  }
static fallback ( ) { if ( ! _storageMethod ) { Logger . info ( 'No Storage method set yet.' ) ; return ; } if ( _storageMethod instanceof SMMemoryObject ) { Logger . error ( 'Storage is already using in-memory object. Cannot fall back.' ) ; return ; } Logger . info ( 'Storage error. Falling back to in-memory object.' ) ; let oldStorageMethod = _storageMethod , items = oldStorageMethod . findItems ( _storagePrefix ) ; _storageMethod = new SMMemoryObject ( ) ; items . forEach ( key => { _storageMethod . setItem ( key , oldStorageMethod . getItem ( key ) ) ; oldStorageMethod . removeItem ( key ) ; } ) ; }
Falls back to in-memory storage if the previous storage method fails
 @returns {void}
Falls back to in - memory storage if the previous storage method fails @returns { void }