Library internal method to transfer the Object to a new store.
 @param store [Store] New store
341250
def _transfer(store)
      @store = store
      # Remove the previously defined finalizer as it is attached to the old
      # store.
      ObjectSpace.undefine_finalizer(self)
      # Register the object as in-memory object with the new store.
      @store._register_in_memory(self, @_id)
      # Register the finalizer for the new store.
      ObjectSpace.define_finalizer(
        self, ObjectBase._finalize(@store, @_id, object_id))
      @myself = POXReference.new(@store, @_id)
    end
648156
function( options ){
		var store = new XStore( options );

		// If the store has an id, register it in Fluxify and in the dispatcher
		if( store._id ){
			this.stores[ store._id ] = store;
			this.dispatcher.registerStore( store._id, store );
		}

		return store;
	}
30239
function Eventstore(options, store) {
  this.options = options || {};
  this.store = store;

  this.eventMappings = {};

  EventEmitter.call(this);
}
271892
static BitStore newRangedView(BitStore store, int from, int to) {
		if (store == null) throw new IllegalArgumentException("null store");
		if (from < 0) throw new IllegalArgumentException();
		if (from > to) throw new IllegalArgumentException();
		if (to > store.size()) throw new IllegalArgumentException();
		return new AbstractBitStore() {

			@Override
			public int size() {
				return to - from;
			}

			@Override
			public boolean getBit(int index) {
				return store.getBit(adjIndex(index));
			}

			@Override
			public void setBit(int index, boolean value) {
				store.setBit(adjIndex(index), value);
			}

			@Override
			public void flipBit(int index) {
				store.flipBit(adjIndex(index));
			}

			@Override
			public long getBits(int position, int length) {
				return store.getBits(adjPosition(position), length);
			}

			@Override
			public int getBitsAsInt(int position, int length) {
				return store.getBitsAsInt(adjPosition(position), length);
			}

			@Override
			public boolean getThenSetBit(int index, boolean value) {
				return store.getThenSetBit(adjIndex(index), value);
			}

			@Override
			public void setStore(int position, BitStore that) {
				store.setStore(adjPosition(position), that);
			}

			@Override
			public BitWriter openWriter() {
				return Bits.newBitWriter(store, from, to);
			}

			@Override
			public BitWriter openWriter(int finalPos, int initialPos) {
				return store.openWriter(adjPosition(finalPos), adjPosition(initialPos));
			}

			@Override
			public BitReader openReader() {
				return store.openReader(from, to);
			}

			@Override
			public BitReader openReader(int finalPos, int initialPos) {
				return store.openReader(adjPosition(finalPos), adjPosition(initialPos));
			}

			@Override
			public boolean isMutable() {
				return store.isMutable();
			}

			private int adjIndex(int index) {
				if (index < 0) throw new IllegalArgumentException("negative index");
				index += from;
				if (index >= to) throw new IllegalArgumentException("index too large");
				return index;
			}

			private int adjPosition(int position) {
				if (position < 0) throw new IllegalArgumentException("negative position");
				position += from;
				if (position > to) throw new IllegalArgumentException("position too large");
				return position;
			}
		};
	}
1068955
function(key, value) {
			var store = this._local.store;

			if (value === undefined) {
				return store.get.call(this, key);
			} else if (value === null) {
				store.remove.call(this, key);
			} else {
				store.set.call(this, key, value);
			}
		}
1316078
def upgradeSystemOid(store):
    
    store.transact(
        _upgradeTableOid, store, 'axiom_types',
        lambda: store.executeSchemaSQL(CREATE_TYPES))
    store.transact(
        _upgradeTableOid, store, 'axiom_objects',
        lambda: store.executeSchemaSQL(CREATE_OBJECTS),
        lambda: store.executeSchemaSQL(CREATE_OBJECTS_IDX))
227594
def get(self, key):
    ''''''
    value = None
    for store in self._stores:
      value = store.get(key)
      if value is not None:
        break

    # add model to lower stores only
    if value is not None:
      for store2 in self._stores:
        if store == store2:
          break
        store2.put(key, value)

    return value
1133162
def save_to_store(self):
        
        if not self._store:
            raise AttributeError('No datastore defined!')
        saved_data = self.save_to_data(in_place=True)
        data = Serializer.serialize(saved_data)
        self._store.store_blob(data, 'all_keys_with_undefined')
1093395
function mw(store) {
    if (savedStore && savedStore !== store) {
      throw new Error('cannot assign logicMiddleware instance to multiple stores, create separate instance for each');
    }
    savedStore = store;

    return next => {
      savedNext = next;
      const { action$, sub, logicCount: cnt } =
            applyLogic(arrLogic, savedStore, savedNext,
                       logicSub, actionSrc$, deps, logicCount,
                       monitor$);
      actionEnd$ = action$;
      logicSub = sub;
      logicCount = cnt;

      return action => {
        debug('starting off', action);
        monitor$.next({ action, op: 'top' });
        actionSrc$.next(action);
        return action;
      };
    };
  }
998147
def _make_register(self) -> BaseRegisterStore:
        

        s = settings.REGISTER_STORE
        store_class = import_class(s['class'])
        return store_class(**s['params'])
1354891
function (options) {
  if (!(this instanceof Store)) {
    return new Store(options)
  }

  this._opts = options || {}
  this.db = new Datastore({ filename: this._opts.filename, autoload: true })
}
323507
function (property, store) {

      if (!isStore(store)) {
        throw new Error('Store expected');
      }

      var _this = this;

      store.onChange(function () {
        if (property) {
          _this.setState(property, store.state);
        } else {
          _this.setState(store.state);
        }
      });

      this.onReset(function () {
        store.resetState();
      });

      this.on('storeWillMount', function () {
        store.replaceProps(_this.props);
        store.emit('storeWillMount');
      });

      this.on('storeWillUnmount', function () {
        store.emit('storeWillUnmount');
        store.replaceProps(_this.props);
      });

      this.on('storeWillReceiveProps', function () {
        store.replaceProps(_this.props);
        store.emit('storeWillReceiveProps');
      });
    }
711884
function hyperRepeat(store) {
  this.compile = compile;

  this.state = function(config, state) {
    var res = store.get(config.path, state);
    if (!res.completed) return false;
    return state.set(config.source, res.value);
  };

  this.children = function(config, state, children) {
    var items = state.get(config.source);
    var arr = [];
    if (!items) return arr;

    var target = config.target;
    var i, c, child;

    var path = ['state', target];

    for (i = 0; i < items.length; i++) {
      function update() {return items[i]};

      for (c = 0; c < children.length; c++) {
        child = children[c];
        if (!child) continue;
        // TODO set the key prop
        child = child.updateIn(path, update);
        arr.push(child);
      }
    }
    return arr;
  };
}
400941
function createStore(descriptor) {
    var store = new pastore_1.XStore(descriptor.initState);
    store.name = descriptor.name;
    if (descriptor.actions)
        store.actions = descriptor.actions;
    if (descriptor.middlewares)
        store.actionMiddlewares = descriptor.middlewares;
    return store;
}
233582
function onupgradeneeded() {
            self.db = request.result;
            self.transaction = request.transaction;

            // NB! in case of a version conflict, we don't try to migrate,
            // instead just throw away the old store and create a new one.
            // this happens if somebody changed the 
            try {
                self.db.deleteObjectStore(self.record);
            } catch (e) { /* ignore */ }

            // create object store.
            var objectStoreOptions = {
                autoIncrement: useAutoIncrement()
            }
            if( typeof( self.keyPath )) {
                objectStoreOptions.keyPath = self.keyPath;
            }
            self.db.createObjectStore(self.record, objectStoreOptions);
        }
93074
def _update_tree_store(self):
        

        self.list_store.clear()
        if self.view_dict['transitions_internal'] and isinstance(self.model, ContainerStateModel) and \
                len(self.model.state.transitions) > 0:
            for transition_id in self.combo['internal'].keys():
                # print("TRANSITION_ID: ", transition_id, self.model.state.transitions)
                t = self.model.state.transitions[transition_id]

                if t.from_state is not None:
                    from_state = self.model.state.states[t.from_state]
                    from_state_label = from_state.name
                    from_outcome_label = from_state.outcomes[t.from_outcome].name
                else:
                    from_state_label = "self (" + self.model.state.name + ")"
                    from_outcome_label = ""

                if t.to_state is None:
                    to_state_label = "self (" + self.model.state.name + ")"
                    to_outcome = None if t.to_outcome is None else self.model.state.outcomes[t.to_outcome]
                    to_outcome_label = "None" if to_outcome is None else to_outcome.name
                else:
                    # print(t.to_state, self.model.states)
                    if t.to_state == self.model.state.state_id:
                        to_state_label = "self (" + self.model.state.name + ")"
                        to_outcome_label = self.model.state.outcomes[t.to_outcome].name
                    else:
                        to_state_label = self.model.state.states[t.to_state].name
                        to_outcome_label = None

                self.list_store.append([transition_id,  # id
                                        from_state_label,  # from-state
                                        from_outcome_label,  # from-outcome
                                        to_state_label,  # to-state
                                        to_outcome_label,  # to-outcome
                                        False,  # is_external
                                        t,
                                        self.model.state,
                                        True,
                                        self.model.get_transition_m(transition_id)])

        if self.view_dict['transitions_external'] and self.model.parent and \
                len(self.model.parent.state.transitions) > 0:
            for transition_id in self.combo['external'].keys():
                # print("TRANSITION_ID: ", transition_id, self.model.parent.state.transitions)
                try:
                    t = self.model.parent.state.transitions[transition_id]
                    # logger.info(str(t))
                    from_state = None
                    if t.from_state is not None:
                        from_state = self.model.parent.states[t.from_state].state

                    if from_state is None:
                        from_state_label = "parent (" + self.model.state.parent.name + ")"
                        from_outcome_label = ""
                    elif from_state.state_id == self.model.state.state_id:
                        from_state_label = "self (" + from_state.name + ")"
                        from_outcome_label = from_state.outcomes[t.from_outcome].name
                    else:
                        from_state_label = from_state.name
                        from_outcome_label = from_state.outcomes[t.from_outcome].name

                    if t.to_state == self.model.parent.state.state_id:
                        to_state_label = 'parent (' + self.model.parent.state.name + ")"
                        to_outcome_label = self.model.parent.state.outcomes[t.to_outcome].name
                    else:
                        if t.to_state == self.model.state.state_id:
                            to_state_label = "self (" + self.model.state.name + ")"
                        else:
                            to_state_label = self.model.parent.state.states[t.to_state].name
                        to_outcome_label = None

                    self.list_store.append([transition_id,  # id
                                            from_state_label,  # from-state
                                            from_outcome_label,  # from-outcome
                                            to_state_label,  # to-state
                                            to_outcome_label,  # to-outcome
                                            True,  # is_external
                                            t,
                                            self.model.state,
                                            True,
                                            self.model.parent.get_transition_m(transition_id)])
                except Exception as e:
                    logger.warning("There was a problem while updating the data-flow widget TreeStore. {0}".format(e))
1024729
def put(key, data)
      queue = queues(key)
      return nil unless queue

      @stats[:current_bytes] += data.size
      @stats[:total_items] += 1

      queue.push(data)

      return true
    end