This method is call when a viewReference need to be update.

@param ViewReferenceEvent $event
774376
public function updateViewReference(ViewReferenceEvent $event)
    {
        $view = $event->getView();
        if ($viewReference = $this->viewReferenceBuilder->buildViewReference($view, $this->em)) {
            $this->viewReferenceManager->saveReference($viewReference);
        }
    }
202975
public function onUpdate(EventInterface $event)
    {
        $values = $event->getParam('values');

        $now = new DateTime();
        $values['last_updated_at'] = $now->format('Y-m-d h:i:s');

        $event->setParam('values', $values);
    }
907454
protected void retain(BaseEvent event) {
        Info info = events.get(event);
        if (info != null) {
            info.refcount.incrementAndGet();
        } else {
            log.warn("Retain called on already released event.");
        }
    }
1014612
public function postUpdate(UpdateEvent $event)
    {
        $workspace = $event->getObject();
        $root = $this->resourceManager->getWorkspaceRoot($workspace);
        $root->setName($workspace->getName());
        $this->om->persist($root);
        $this->om->flush();
    }
400858
public function onUpdate(SubscriberEvent $event)
    {
        $this->listRepository->update(
            $event->getListId(),
            $event->getSubscriber()
        );
    }
694053
public function processPreview(FormActionEvent $event): void
    {
        /** @var ContentCreateData|ContentUpdateData $data */
        $data = $event->getData();
        $form = $event->getForm();
        $languageCode = $form->getConfig()->getOption('languageCode');
        $referrerLocation = $event->getOption('referrerLocation');

        try {
            $contentDraft = $this->saveDraft($data, $languageCode);
            $contentLocation = $this->resolveLocation($contentDraft, $referrerLocation, $data);
            $url = $this->urlGenerator->generate('ezplatform.content.preview', [
                'locationId' => null !== $contentLocation ? $contentLocation->id : null,
                'contentId' => $contentDraft->id,
                'versionNo' => $contentDraft->getVersionInfo()->versionNo,
                'languageCode' => $languageCode,
            ]);
        } catch (Exception $e) {
            $this->notificationHandler->error(
                /** @Desc("Cannot save content draft.") */
                $this->translator->trans('error.preview', [], 'content_preview')
            );
            $url = $this->getContentEditUrl($data, $languageCode);
        }

        $event->setResponse(
            new RedirectResponse($url)
        );
    }
531968
public function beforeUpdate($event)
    {
        $fields = $this->fields;
        $nowDate = gmdate($this->databaseTimeFormat);
        if (!$this->isActuallyDirty()) {
            return;
        }

        if (isset($this->fields['modifiedField']) && !$this->owner->isAttributeChanged($this->fields['modifiedField'])) {
            $this->owner->{$this->fields['modifiedField']} = $nowDate;
        }
        if (isset($this->fields['modifiedByField']) && !$this->owner->isAttributeChanged($this->fields['modifiedByField'])) {
            $this->owner->{$this->fields['modifiedByField']} = self::_getUserId();
        }
    }
1028582
public function onUpdateRelation($event)
    {
        $sender = $event->sender;
        /* @var $sender static */
        if ($sender->relationType == static::$relationMutual) {
            $opposite = static::buildOppositeRelation($sender);
            $opposite->off(static::EVENT_AFTER_UPDATE, [$opposite, 'onUpdateRelation']);
            if (!$opposite->save()) {
                $opposite->recordWarnings();
                throw new IntegrityException('Reverse relation update failed.');
            }
            $opposite->on(static::EVENT_AFTER_UPDATE, [$opposite, 'onUpdateRelation']);
        }
    }
92513
public function removeUrlForViewReference(ViewReference $viewReference)
    {
        $id = $viewReference->getId();
        if ($url = $this->repository->findValueForId('url', $id)) {
            $this->manager->removeUrl($url, $this->repository->findValueForId('locale', $id));
        }
    }
820330
public function update(FeatureUpdateEvent $event, $eventName, EventDispatcherInterface $dispatcher)
    {
        if (null !== $feature = FeatureQuery::create()->findPk($event->getFeatureId())) {
            $feature
                ->setDispatcher($dispatcher)

                ->setLocale($event->getLocale())
                ->setTitle($event->getTitle())
                ->setDescription($event->getDescription())
                ->setChapo($event->getChapo())
                ->setPostscriptum($event->getPostscriptum())

                ->save();

            $event->setFeature($feature);
        }
    }
532339
public function onPostUpdateCmd(Event $event)
    {
        $this->bridgeFactory->createBridge($event->getIO())
            ->update($event->getComposer());
    }
49109
protected function handle($event): void
    {
        $method = $this->getApplyMethod($event);

        if (!method_exists($this, $method)) {
            return;
        }

        $this->$method($event);
    }
804075
protected function handle(Event $event)
    {
        $method = $this->getApplyMethod($event);
        if (!method_exists($this, $method)) {
            return;
        }
        $this->$method($event);
    }
828381
public function beforeUpdate($event = null)
    {
        foreach (['child', 'parent'] as $role) {
            $primaryField = $this->getPrimaryField($role);
            $this->wasPrimary[$role] = !empty($this->owner->{$primaryField});
            if (!$this->owner->isActive) {
                $this->owner->{$primaryField} = 0;
            }
        }

        return true;
    }
894922
@ViewChanged
	public synchronized void onViewChangeEvent(ViewChangedEvent event) {
		
		if (logger.isDebugEnabled()) {
			logger.debug("onViewChangeEvent : pre[" + event.isPre() + "] : event local address[" + event.getCache().getLocalAddress() + "]");
		}
		
		final List<Address> oldView = currentView;
		currentView = new ArrayList<Address>(event.getNewView().getMembers());
		final Address localAddress = getLocalAddress();
		
		//just a precaution, it can be null!
		if (oldView != null) {
			final Cache jbossCache = mobicentsCache.getJBossCache();
			final Configuration config = jbossCache.getConfiguration();		

			final boolean isBuddyReplicationEnabled = config.getBuddyReplicationConfig() != null && config.getBuddyReplicationConfig().isEnabled();
			// recover stuff from lost members
			Runnable runnable = new Runnable() {
				public void run() {
					for (Address oldMember : oldView) {
						if (!currentView.contains(oldMember)) {
							if (logger.isDebugEnabled()) {
								logger.debug("onViewChangeEvent : processing lost member " + oldMember);
							}
							for (FailOverListener localListener : failOverListeners) {
								ClientLocalListenerElector localListenerElector = localListener.getElector();
								if (localListenerElector != null && !isBuddyReplicationEnabled) {
									// going to use the local listener elector instead, which gives results based on data
									performTakeOver(localListener,oldMember,localAddress, true, isBuddyReplicationEnabled);
								}
								else {
									
									List<Address> electionView = getElectionView(oldMember);
									if(electionView!=null && elector.elect(electionView).equals(localAddress))
									{
										performTakeOver(localListener, oldMember, localAddress, false, isBuddyReplicationEnabled);
									}
									
									cleanAfterTakeOver(localListener, oldMember);
								}
							}
						}
					}
				}
			};
			Thread t = new Thread(runnable);
			t.start();
		}
		
	}
752342
public function onLayoutBoxPreUpdate(EntityEvent $event)
    {
        $resource = $event->getEntity();
        if ($resource instanceof LayoutBox) {
            $request  = $this->getRequestHelper()->getCurrentRequest();
            $settings = $this->getBoxSettingsFromRequest($request);
            $settings = $this->mergeUnmodifiedSettings($resource->getSettings(), $settings);
            $resource->setSettings($settings);
        }
    }
1011092
final private function replayChange(Event $event)
    {
        $this->apply($event->payload());
        $this->lastCommittedEventSequenceNumber = $event->sequenceNumber();
    }