Used when sending changes to client. Only send changes above syncedRevision since client is already in sync with syncedRevision.
347026
function sendAnyChanges() {
                // Get all changes after syncedRevision that was not performed by the client we're talkin' to.
                var changes = db.changes.filter(function (change) { return change.rev > syncedRevision && change.source !== conn.clientIdentity; });
                // Compact changes so that multiple changes on same object is merged into a single change.
                var reducedSet = reduceChanges(changes, conn.clientIdentity);
                // Convert the reduced set into an array again.
                var reducedArray = Object.keys(reducedSet).map(function (key) { return reducedSet[key]; });
                // Notice the current revision of the database. We want to send it to client so it knows what to ask for next time.
                var currentRevision = db.revision;

                conn.sendText(JSON.stringify({
                    type: "changes",
                    changes: reducedArray,
                    currentRevision: currentRevision,
                    partial: false // Tell client that these are the only changes we are aware of. Since our mem DB is syncronous, we got all changes in one chunk.
                }));

                syncedRevision = currentRevision; // Make sure we only send revisions coming after this revision next time and not resend the above changes over and over.
            }
1007350
private void submitRevisions(final RevisionList changes) {
        int remaining = changes.size();
        int size = batcher.getCapacity();
        int start = 0;
        while (remaining > 0) {
            if (size > remaining)
                size = remaining;
            RevisionList subChanges = new RevisionList(changes.subList(start, start + size));
            batcher.queueObjects(subChanges);
            start += size;
            remaining -= size;
            pauseOrResume();
            waitIfPaused();
            // if not running state anymore, exit from loop.
            if (!isRunning())
                break;
        }
    }
340361
public void onTransformChanged() {
        Log.v(Log.SUBSYSTEM.WIDGET, TAG, "onTransformChanged(): %s mPreventTransformChanged = %b",
                getName(), mPreventTransformChanged);

        // Even if the calling code that altered the transform doesn't request a
        // layout, we'll do a layout the next time a layout is requested on our
        // part of the scene graph.
        if (!mPreventTransformChanged) {
            mChanged = true;

            // Clear this to indicate that the bounding box has been invalidated and
            // needs to be constructed and transformed anew.
            mBoundingBox = null;
        }
    }
123486
async def send(self, clear=True, parse_mode=()):
        
        await self._client.send_message(
            self._peer, self.text, reply_to=self.reply_to_msg_id,
            link_preview=self.link_preview, parse_mode=parse_mode,
            clear_draft=clear
        )
1090510
@SdkInternalApi
    void updatePersistableTransfer(Integer lastFullyDownloadedPartNumber) {
        synchronized (this) {
            this.lastFullyDownloadedPartNumber = lastFullyDownloadedPartNumber;
        }

        persistableDownload = captureDownloadState(getObjectRequest, file);
        S3ProgressPublisher.publishTransferPersistable(progressListenerChain, persistableDownload);
    }
795608
void notifyMwRevisionProcessors(MwRevision mwRevision, boolean isCurrent) {
		if (mwRevision == null || mwRevision.getPageId() <= 0) {
			return;
		}
		for (MwRevisionProcessorBroker.RevisionSubscription rs : this.revisionSubscriptions) {
			if (rs.onlyCurrentRevisions == isCurrent
					&& (rs.model == null || mwRevision.getModel().equals(
							rs.model))) {
				rs.mwRevisionProcessor.processRevision(mwRevision);
			}
		}
	}
1003854
def _notify_add(self, slice_):
        """"""
        change = AddChange(self, slice_)
        self.notify_observers(change)
1339305
def notifyObservers(self, arg=None):
        ''''''

        self.mutex.acquire()
        try:
            if not self.changed:
                    return
            # Make a local copy in case of synchronous
            # additions of observers:
            localArray = self.obs[:]
            self.clearChanged()
        finally:
            self.mutex.release()
        # Update observers
        for observer in localArray:
            observer.update(self, arg)
811785
protected void selectionChanged() {
		if (getSelectionProvider() == null)
			return;
		INode element = computeHighlightRangeSourceReference();
		// if
		// (getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE))
		synchronizeOutlinePage(element);
		// if (fIsBreadcrumbVisible && fBreadcrumb != null &&
		// !fBreadcrumb.isActive())
		// setBreadcrumbInput(element);
		setSelection(element, false);
		// if (!fSelectionChangedViaGotoAnnotation)
		// updateStatusLine();
		// fSelectionChangedViaGotoAnnotation= false;

	}
1345969
private void sendChangeCipherAndFinish(boolean finishedTag)
            throws IOException {
        Finished mesg = new Finished(protocolVersion, handshakeHash,
            Finished.CLIENT, session.getMasterSecret(), cipherSuite);

        /*
         * Send the change_cipher_spec message, then the Finished message
         * which we just calculated (and protected using the keys we just
         * calculated).  Server responds with its Finished message, except
         * in the "fast handshake" (resume session) case.
         */
        sendChangeCipherSpec(mesg, finishedTag);

        /*
         * save client verify data for secure renegotiation
         */
        if (secureRenegotiation) {
            clientVerifyData = mesg.getVerifyData();
        }

        /*
         * Update state machine so server MUST send 'finished' next.
         * (In "long" handshake case; in short case, we're responding
         * to its message.)
         */
        state = HandshakeMessage.ht_finished - 1;
    }
814411
def is_catchup_needed_during_view_change(self) -> bool:
        
        if self.caught_up_for_current_view():
            logger.info('{} is caught up for the current view {}'.format(self, self.viewNo))
            return False
        logger.info('{} is not caught up for the current view {}'.format(self, self.viewNo))

        if self.num_txns_caught_up_in_last_catchup() == 0:
            if self.has_ordered_till_last_prepared_certificate():
                logger.info('{} ordered till last prepared certificate'.format(self))
                return False

        if self.is_catch_up_limit(self.config.MIN_TIMEOUT_CATCHUPS_DONE_DURING_VIEW_CHANGE):
            # No more 3PC messages will be processed since maximum catchup
            # rounds have been done
            self.master_replica.last_prepared_before_view_change = None
            return False

        return True
261961
public void postUpdate()
    {
        if (current != null)
        {
            final Class<? extends State> next = current.checkTransitions(last);
            if (next != null)
            {
                changeState(next);
            }
        }
    }
744597
public void onHttpClientUpgrade() throws Http2Exception {
        if (connection().isServer()) {
            throw connectionError(PROTOCOL_ERROR, "Client-side HTTP upgrade requested for a server");
        }
        if (!prefaceSent()) {
            // If the preface was not sent yet it most likely means the handler was not added to the pipeline before
            // calling this method.
            throw connectionError(INTERNAL_ERROR, "HTTP upgrade must occur after preface was sent");
        }
        if (decoder.prefaceReceived()) {
            throw connectionError(PROTOCOL_ERROR, "HTTP upgrade must occur before HTTP/2 preface is received");
        }

        // Create a local stream used for the HTTP cleartext upgrade.
        connection().local().createStream(HTTP_UPGRADE_STREAM_ID, true);
    }
528969
public void notifyRCDReceiveExclusiveChange(boolean isReceiveExclusive)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "notifyRCDReceiveExclusiveChange", new Object[] {Boolean.valueOf(isReceiveExclusive)});

    // Only do this for ptp as it does not seem to make sense for p/s
    synchronized (_anycastInputHandlers) 
    { 
      for(Iterator i=_anycastInputHandlers.keySet().iterator(); i.hasNext();) 
      { 
        AnycastInputHandler aih = _anycastInputHandlers.get(i.next()); 
        if (aih != null) 
        { 
          RemoteConsumerDispatcher rcd = aih.getRCD();

          rcd.notifyReceiveExclusiveChange(isReceiveExclusive);
        }
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "notifyRCDReceiveExclusiveChange");
  }
139592
protected Diff processRevision(final Revision revision)
		throws UnsupportedEncodingException
	{

		Diff diff = super.processRevision(revision);
		if (diff == null) {
			this.ignoredRevisionsCounter++;
		}
		else {
			this.revisionCounter++;
			this.diffPartCounter += diff.size();
		}

		return diff;
	}
248436
def _notify_change(self, model, attr, old, new, hint=None, setter=None, callback_invoker=None):
        ''' 

        '''
        # if name changes, update by-name index
        if attr == 'name':
            if old is not None:
                self._all_models_by_name.remove_value(old, model)
            if new is not None:
                self._all_models_by_name.add_value(new, model)

        if hint is None:
            serializable_new = model.lookup(attr).serializable_value(model)
        else:
            serializable_new = None

        event = ModelChangedEvent(self, model, attr, old, new, serializable_new, hint, setter, callback_invoker)
        self._trigger_on_change(event)
1182232
function sendChanges(changes, baseRevision, partial, onChangesAccepted) {
                ++requestId;
                acceptCallbacks[requestId.toString()] = onChangesAccepted;

                // In this example, the server expects the following JSON format of the request:
                //  {
                //      type: "changes"
                //      baseRevision: baseRevision,
                //      changes: changes,
                //      partial: partial,
                //      requestId: id
                //  }
                //  To make the sample simplified, we assume the server has the exact same specification of how changes are structured.
                //  In real world, you would have to pre-process the changes array to fit the server specification.
                //  However, this example shows how to deal with the WebSocket to fullfill the API.

                ws.send(JSON.stringify({
                    type: 'changes',
                    changes: changes,
                    partial: partial,
                    baseRevision: baseRevision,
                    requestId: requestId
                }));
            }