Restore the KV-state / ColumnFamily meta data for all key-groups referenced by the current state handle.
962502
private void restoreKVStateMetaData() throws IOException, StateMigrationException {
		KeyedBackendSerializationProxy<K> serializationProxy = readMetaData(currentStateHandleInView);

		this.keygroupStreamCompressionDecorator = serializationProxy.isUsingKeyGroupCompression() ?
			SnappyStreamCompressionDecorator.INSTANCE : UncompressedStreamCompressionDecorator.INSTANCE;

		List<StateMetaInfoSnapshot> restoredMetaInfos =
			serializationProxy.getStateMetaInfoSnapshots();
		currentStateHandleKVStateColumnFamilies = new ArrayList<>(restoredMetaInfos.size());

		for (StateMetaInfoSnapshot restoredMetaInfo : restoredMetaInfos) {
			RocksDbKvStateInfo registeredStateCFHandle =
				getOrRegisterStateColumnFamilyHandle(null, restoredMetaInfo);
			currentStateHandleKVStateColumnFamilies.add(registeredStateCFHandle.columnFamilyHandle);
		}
	}
815923
def restore_state(scan_codes):
    
    _listener.is_replaying = True

    with _pressed_events_lock:
        current = set(_pressed_events)
    target = set(scan_codes)
    for scan_code in current - target:
        _os_keyboard.release(scan_code)
    for scan_code in target - current:
        _os_keyboard.press(scan_code)

    _listener.is_replaying = False
856713
def restore(self, state):
        


        selector = DataStreamSelector.FromString(state.get(u'selector'))
        if self.selector != selector:
            raise ArgumentError("Attempted to restore an InvalidStreamWalker with a different selector",
                                selector=self.selector, serialized_data=state)

        if state.get(u'type') != u'invalid':
            raise ArgumentError("Invalid serialized state for InvalidStreamWalker", serialized_data=state)
268379
def _restore_meta(self):
        
        restore_meta_file = self._get_restore_meta_file()
        filename = self.flags['RESTORE_DIRECTORY'] + self._get_restore_meta_file()
        new_saver = tf.train.import_meta_graph(filename)
        new_saver.restore(self.sess, filename[:-5])
        print("Model restored from %s" % restore_meta_file)
976627
def restore_attrs
      draftable_columns.each do |key|
        self.send "#{key}=", self.draft.data[key] if self.respond_to?(key)
      end
      self
    end
1365474
def update_last_sm_origin_meta_data(self):
        """"""
        # TODO finally maybe remove this when all backup features are integrated into one backup-structure
        # data also used e.g. to backup tabs
        self.meta['last_saved']['time'] = self.state_machine_model.state_machine.last_update
        self.meta['last_saved']['file_system_path'] = self.state_machine_model.state_machine.file_system_path
1029661
def restore_row(self, row, schema, pk):
        
        result = []
        for field in schema.fields:
            if schema.primary_key and schema.primary_key[0] == field.name:
                if field.type == 'number' and np.isnan(pk):
                    pk = None
                if pk and field.type == 'integer':
                    pk = int(pk)
                result.append(field.cast_value(pk))
            else:
                value = row[field.name]
                if field.type == 'number' and np.isnan(value):
                    value = None
                if value and field.type == 'integer':
                    value = int(value)
                elif field.type == 'datetime':
                    value = value.to_pydatetime()
                result.append(field.cast_value(value))
        return result
744484
public synchronized void clear()
    {
        for (String keyspaceName : getNonSystemKeyspaces())
        {
            KSMetaData ksm = getKSMetaData(keyspaceName);
            for (CFMetaData cfm : ksm.cfMetaData().values())
                purge(cfm);
            clearKeyspaceDefinition(ksm);
        }

        updateVersionAndAnnounce();
    }
938735
def restoreState(self):
        
        if os.path.exists(self._stateFile):
            try:
                fp = open(self._stateFile,  'r')
                stateObj = pickle.load(fp)
            except:
                raise IOError("Failure in reading plugin state from file: %s" 
                              % self._stateFile)
            return stateObj
        return None
43946
private void restoreData() {
		Map<String, ?> map = preferenceUtils.getAll();
		Set<String> strings = map.keySet();

		for (String string : strings) {
			if (string.startsWith(SharedPreferenceUtils.keyTestMode)) {
				preferenceUtils.restoreKey(string);
			}
		}

		refreshKeyValues();

	}
858650
def restore(self):
        
        if self._fire_model_event("restoring") is False:
            return False

        setattr(self, self.get_deleted_at_column(), None)

        self.set_exists(True)

        result = self.save()

        self._fire_model_event("restored")

        return result
1045621
def rebuild_encrypted_properties(old_key, model, properties):
    
    inspector = reflection.Inspector.from_engine(db.engine)
    primary_key_names = inspector.get_primary_keys(model.__tablename__)

    new_secret_key = current_app.secret_key
    db.session.expunge_all()
    try:
        with db.session.begin_nested():
            current_app.secret_key = old_key
            db_columns = []
            for primary_key in primary_key_names:
                db_columns.append(getattr(model, primary_key))
            for prop in properties:
                db_columns.append(getattr(model, prop))
            old_rows = db.session.query(*db_columns).all()
    except Exception as e:
        current_app.logger.error(
            'Exception occurred while reading encrypted properties. '
            'Try again before starting the server with the new secret key.')
        raise e
    finally:
        current_app.secret_key = new_secret_key
        db.session.expunge_all()

    for old_row in old_rows:
        primary_keys, old_entries = old_row[:len(primary_key_names)], \
                                    old_row[len(primary_key_names):]
        primary_key_fields = dict(zip(primary_key_names, primary_keys))
        update_values = dict(zip(properties, old_entries))
        model.query.filter_by(**primary_key_fields).\
            update(update_values)
    db.session.commit()
422083
def refresh_index(meta, index) -> None:
    
    # All projections include model + index keys
    projection_keys = set.union(meta.keys, index.keys)

    proj = index.projection
    mode = proj["mode"]

    if mode == "keys":
        proj["included"] = projection_keys
    elif mode == "all":
        proj["included"] = meta.columns
    elif mode == "include":  # pragma: no branch
        if all(isinstance(p, str) for p in proj["included"]):
            proj["included"] = set(meta.columns_by_name[n] for n in proj["included"])
        else:
            proj["included"] = set(proj["included"])
        proj["included"].update(projection_keys)

    if proj["strict"]:
        proj["available"] = proj["included"]
    else:
        proj["available"] = meta.columns
675702
public void restoreAttributes()
    {
        String attrName = getScopedName( STORED_ATTRS_ATTR );
        Map savedAttrs = ( Map ) getSession().getAttribute( attrName );

        if ( savedAttrs != null )
        {
            setAttributeMap( savedAttrs );
        }
    }
555420
def keys_recover(cls, fqdn, key):
        """"""
        data = {
            "deleted": False,
        }
        return cls.json_put('%s/domains/%s/keys/%s' % (cls.api_url, fqdn, key),
                            data=json.dumps(data),)
242500
public static <Item extends IItem> void restoreSubItemSelectionStatesForAlternativeStateManagement(Item item, List<String> selectedItems) {
        if (item instanceof IExpandable && !((IExpandable) item).isExpanded() && ((IExpandable) item).getSubItems() != null) {
            List<Item> subItems = (List<Item>) ((IExpandable<Item, ?>) item).getSubItems();
            for (int i = 0, size = subItems.size(); i < size; i++) {
                Item subItem = subItems.get(i);
                String id = String.valueOf(subItem.getIdentifier());
                if (selectedItems != null && selectedItems.contains(id)) {
                    subItem.withSetSelected(true);
                }
                restoreSubItemSelectionStatesForAlternativeStateManagement(subItem, selectedItems);
            }
        }
    }
1138196
public void restoreState() {
        content.append("Q").append_i(separator);
        int idx = stateList.size() - 1;
        if (idx < 0)
            throw new IllegalPdfSyntaxException("Unbalanced save/restore state operators.");
        state = (GraphicState)stateList.get(idx);
        stateList.remove(idx);
    }