Update the `id_` counter so that it doesn't grow forever.
160745
def update_id_counter(self):
        

        if not self.__entries:
            self.__next_id = 1
        else:
            self.__next_id = max(self.__entries.keys()) + 1
1160878
def increment(self, counter_name, delta=1):
    
    self._shard_state.counters_map.increment(counter_name, delta)
222766
def _update_record(self, identifier, rtype=None, name=None, content=None):
        """"""
        if identifier is not None:
            if name is not None:
                records = self._list_records_internal(identifier=identifier)
                if len(records) == 1 and records[0]['name'] != self._full_name(name):
                    # API does not allow us to update name directly
                    self._update_record_with_name(
                        records[0], rtype, name, content)
                else:
                    self._update_record_with_id(identifier, rtype, content)
            else:
                self._update_record_with_id(identifier, rtype, content)
        else:
            guessed_record = self._guess_record(rtype, name)
            self._update_record_with_id(guessed_record['id'], rtype, content)
        return True
769748
@Override
    protected void updateCount() {
        // set counter to the actual value, rather than to try and
        // keep track with a seperate variable.
        // This counter must only be updated by the selector thread,
        // which allows us to omit synchronized logic.
        // there can be timing windows where before we signal a deletion,
        // another request comes in, but the timeout logic will insure
        // that we don't delete an active selector.
        final int selectorCount = selector.keys().size();
        if (selectorCount > 0) {
            // if any keys, don't let selector die
            waitingToQuit = false;
        }
        wqm.updateCount(countIndex, selectorCount, channelType);
    }
259162
def change_id(self, new_id):
        """"""
        self._load_raw_content()
        self._id = new_id
        self.get_filename(renew=True)
        self.get_filepath(renew=True)
        return
1349622
def update(self, id):
        """"""
        # url('DataStores', id=ID)
        content = request.environ['wsgi.input'].read(int(request.environ['CONTENT_LENGTH']))
        content = content.decode('utf8')
        content = simplejson.loads(content)        
        result = meta.Session.query(DataStore).get(id)
        result.name = content['name']
        result.type = content['type']
        result.ogrstring = content['ogrstring']
        meta.Session.commit()
        response.status = 201
54945
def update_view_count_by_uid(uid):
        '''
        
        '''
        entry = TabWiki.update(
            view_count=TabWiki.view_count + 1
        ).where(
            TabWiki.uid == uid
        )
        entry.execute()
1097180
def _wanna_emit_id_changed(self):
        """"""
        if self._last_id != self._get_id():
            self._last_id = self._get_id()
            self.id_changed.emit()
411330
private void updateStatistics() {
        final PNCounterService service = getService();
        final LocalPNCounterStatsImpl stats = service.getLocalPNCounterStats(name);
        if (delta > 0) {
            stats.incrementIncrementOperationCount();
        } else if (delta < 0) {
            stats.incrementDecrementOperationCount();
        }
        stats.setValue(getBeforeUpdate ? (response.getValue() + delta) : response.getValue());
    }
1070718
def increment(self):
        ""
        self._count += 1
        waiters = self._waiters.pop(self._count, [])
        if waiters:
            scheduler.state.awoken_from_events.update(waiters)
1212464
private void refreshId()
	{
		if (null == getName())
		{
			setId(null);
		}
		else
		{
			if (null == getIdSuffix())
			{
				setId(getName());
			}
			else
			{
				setId(getName() + getIdSuffix());
			}
		}
	}
1005149
def update_id(self, sequence_id=None, force=True):
        """"""
        from ..identity import ObjectNumber

        if sequence_id:
            self.sequence_id = sequence_id

        assert self.d_vid

        if self.id is None or force:
            dataset_id = ObjectNumber.parse(self.d_vid).rev(None)
            self.d_id = str(dataset_id)
            self.id = str(TableNumber(dataset_id, self.sequence_id))

        if self.vid is None or force:
            dataset_vid = ObjectNumber.parse(self.d_vid)
            self.vid = str(TableNumber(dataset_vid, self.sequence_id))
22218
def load(self, id=None):
        """"""
        if id is not None:
            # We are asked to change our ID to something else
            self.reset()
            self._setID(id)
        if not self._new and self._validID():
            self._loadDB()
        self._updated = time.time()
109736
def register_id(self, id_string):
        
        try:
            prefix, count = id_string.rsplit("_", 1)
            count = int(count)
        except ValueError:
            # We don't need to worry about ids that don't match our pattern
            pass
        else:
            if prefix == self.prefix:
                self.counter = max(count, self.counter)
1356853
def update_milestone(id, **kwargs):
    
    data = update_milestone_raw(id, **kwargs)
    if data:
        return utils.format_json(data)
864942
def generate_id(self):
        """"""
        if self.use_repeatable_ids:
            self.repeatable_id_counter += 1
            return 'autobaked-{}'.format(self.repeatable_id_counter)
        else:
            return str(uuid4())
439545
def update_values(self):
        """"""
        self.method = self.idx_method.currentText()
        sw_det = DetectSlowWave(method=self.method)

        self.index['f1'].set_value(sw_det.det_filt['freq'][0])
        self.index['f2'].set_value(sw_det.det_filt['freq'][1])
        self.index['min_trough_dur'].set_value(sw_det.trough_duration[0])
        self.index['max_trough_dur'].set_value(sw_det.trough_duration[1])
        self.index['max_trough_amp'].set_value(sw_det.max_trough_amp)
        self.index['min_ptp'].set_value(sw_det.min_ptp)
        self.index['min_dur'].set_value(sw_det.min_dur)
        self.index['max_dur'].set_value(sw_det.max_dur)