Updates the global index.
324041
private void updateGlobalIndex() {
    context.checkThread();

    // The global index may have increased even if the commit index didn't. Update the global index.
    // The global index is calculated by the minimum matchIndex for *all* servers in the cluster, including
    // passive members. This is critical since passive members still have state machines and thus it's still
    // important to ensure that tombstones are applied to their state machines.
    // If the members list is empty, use the local server's last log index as the global index.
    long currentTime = System.currentTimeMillis();
    long globalMatchIndex = context.getClusterState().getRemoteMemberStates().stream()
      .filter(m -> m.getMember().type() != Member.Type.RESERVE && (m.getMember().status() == Member.Status.AVAILABLE || currentTime - m.getMember().updated().toEpochMilli() < context.getGlobalSuspendTimeout().toMillis()))
      .mapToLong(MemberState::getMatchIndex)
      .min()
      .orElse(context.getLog().lastIndex());
    context.setGlobalIndex(globalMatchIndex);
  }
628576
def update(self):
        """"""
        events = pygame.event.get()
        for e in events:
            self.update_on_event(e)

        for wid, cond in self._widgets:
            if cond():
                wid.update(events)
664678
def update(self) -> None:
        """"""
        mask = self.mask
        weights = self.refweights[mask]
        self[~mask] = numpy.nan
        self[mask] = weights/numpy.sum(weights)
424157
public void updateIndex() {

        if (!isEnabled()) {
            return;
        }

        final IndexWriterConfig indexWriterConfig = new IndexWriterConfig(new StandardAnalyzer());
        indexWriterConfig
                .setCommitOnClose(true)
                .setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_APPEND);

        try (IndexWriter indexWriter = new IndexWriter(directory, indexWriterConfig)) {
            final List<IPortletDefinition> portlets = portletRegistry.getAllPortletDefinitions();
            portlets.forEach(portlet -> indexPortlet(portlet, indexWriter));
        } catch (Exception e) {
            logger.error("Unable to update index", e);
        }
    }
339625
public void setGlobalTableGlobalSecondaryIndexSettingsUpdate(
            java.util.Collection<GlobalTableGlobalSecondaryIndexSettingsUpdate> globalTableGlobalSecondaryIndexSettingsUpdate) {
        if (globalTableGlobalSecondaryIndexSettingsUpdate == null) {
            this.globalTableGlobalSecondaryIndexSettingsUpdate = null;
            return;
        }

        this.globalTableGlobalSecondaryIndexSettingsUpdate = new java.util.ArrayList<GlobalTableGlobalSecondaryIndexSettingsUpdate>(
                globalTableGlobalSecondaryIndexSettingsUpdate);
    }
345173
def __update_indices
      model.indices.values.each do |index|
        __robject.indexes[index.riak_name] = index.value_from(attributes)
      end
    end
244292
public void addOrUpdate(long[] indexes, double value) {

        long[] physicalIndexes = isView() ? translateToPhysical(indexes) : indexes;

        for (int i = 0; i < length; i++) {
            long[] idx = getUnderlyingIndicesOf(i).asLong();
            if (Arrays.equals(idx, physicalIndexes)) {
                // There is already a non-null value at this index
                // -> update the current value, the sort is maintained
                if (value == 0) {
                    removeEntry(i);
                    length--;
                } else {
                    values.put(i, value);
                    length++;
                }
                return;
            }
        }

        // If the value is 0 and there is no existing non-null value at the given index
        if (value == 0) {
            return;
        }

        /* It's a new non-null element. We add the value and the indexes at the end of their respective databuffers.
        * The buffers are no longer sorted !
        * /!\ We need to reallocate the buffers if they are full
        */
        while (!canInsert(values, 1)) {
            long size = (long) Math.ceil((values.capacity() * THRESHOLD_MEMORY_ALLOCATION));
            values.reallocate(size);
        }
        values.put(length, value);
        while (!canInsert(indices, physicalIndexes.length)) {
            long size = (long) Math.ceil((indices.capacity() * THRESHOLD_MEMORY_ALLOCATION));
            indices.reallocate(size);
        }
        for (int i = 0; i < physicalIndexes.length; i++) {
            indices.put(length * rank() + i, physicalIndexes[i]);
        }
        length++;
        isSorted = false;
    }
488325
def update(self, instance, oldValue, newValue):
    """"""
    self.__set__(instance,
                 self.__get__(instance, None) + newValue - (oldValue or 0))
482228
def _update_index_on_df(df, index_names):
    """"""
    if index_names:
        df = df.set_index(index_names)
        # Remove names from unnamed indexes
        index_names = _denormalize_index_names(index_names)
        df.index.names = index_names
    return df
1165247
def _update_Prxy(self):
        """"""
        self.Prxy = self.Frxy * self.Qxy
        _fill_diagonals(self.Prxy, self._diag_indices)
783816
def update(self):
        """"""
        expire_time = time.time() - self.max_time
        while self.row_deque and self.time_deque[0] < expire_time:
            self.row_deque.popleft()  # FIFO
            self.time_deque.popleft()
178659
def _updateItemComboBoxIndex(self, item, column, num):
        """"""
        item._combobox_current_index[column] = num
        item._combobox_current_value[column] = item._combobox_option_list[column][num][0]
1011570
def add_global(self, globalvalue):
        
        assert globalvalue.name not in self.globals
        self.globals[globalvalue.name] = globalvalue
212089
async def update(self):
        """"""
        status_data = await self._request('/status.json?show_avail=1')

        if status_data:
            self.status_data = status_data

            sensor_data = await self._request('/sensors.json')
            if sensor_data:
                self.sensor_data = sensor_data
1351606
def update(self, instance, oldValue, newValue, subKey):
    """"""
    histogram = self.__get__(instance, None)
    histogram[subKey] += newValue - oldValue
774742
private void updateIndexName() {
        this.logIndexName = this.logIndexPrefix + "_" + SIMPLE_DATE_FORMAT.format(new Date());

        try {
            addIndex(logIndexName);
        } catch (IOException e) {
            logger.error("Failed to update log index name: {}", logIndexName, e);
        }
    }
928164
ServerContext setGlobalIndex(long globalIndex) {
    Assert.argNot(globalIndex < 0, "global index must be positive");
    this.globalIndex = Math.max(this.globalIndex, globalIndex);
    log.compactor().majorIndex(this.globalIndex - 1);
    return this;
  }