Refreshes the Contentful entry for provided remote entry.
516336
public function refreshContentfulEntry(Entry $remoteEntry): ?ContentfulEntry
    {
        $id = $remoteEntry->getSpace()->getId() . '|' . $remoteEntry->getId();
        $contentfulEntry = $this->findContentfulEntry($id);

        if ($contentfulEntry instanceof ContentfulEntry) {
            $contentfulEntry->setJson((string) json_encode($remoteEntry));
            $contentfulEntry->setIsPublished(true);
            $this->entityManager->persist($contentfulEntry);
            $this->entityManager->flush();
        } else {
            $contentfulEntry = $this->buildContentfulEntry($remoteEntry, $id);
        }

        return $contentfulEntry;
    }
229049
protected void refresh()
    {
        if (log.isDebugEnabled())
                log.debug("Refresh this transaction for reuse: " + this);
        try
        {
            // we reuse ObjectEnvelopeTable instance
            objectEnvelopeTable.refresh();
        }
        catch (Exception e)
        {
            if (log.isDebugEnabled())
            {
                log.debug("error closing object envelope table : " + e.getMessage());
                e.printStackTrace();
            }
        }
        cleanupBroker();
        // clear the temporary used named roots map
        // we should do that, because same tx instance
        // could be used several times
        broker = null;
        clearRegistrationList();
        unmaterializedLocks.clear();
        txStatus = Status.STATUS_NO_TRANSACTION;
    }
536840
@Override
    public void refreshContainer() {
        final Indexed container = getContainerDataSource();
        if (hasGeneratedPropertySupport()
                && getGeneratedPropertySupport().getRawContainer() instanceof LazyQueryContainer) {
            ((LazyQueryContainer) getGeneratedPropertySupport().getRawContainer()).refresh();
            return;
        }

        if (container instanceof LazyQueryContainer) {
            ((LazyQueryContainer) container).refresh();
        }
    }
528634
def refresh(self):
        
        if self.exists:
            self.delete()
        self.populate()
        self.open()
885962
private function buildContentEntries(array $entries): void
    {
        foreach ($entries as $remoteEntry) {
            if ($remoteEntry instanceof Entry) {
                $contentfulEntry = $this->contentful->refreshContentfulEntry($remoteEntry);
                if ($contentfulEntry !== null) {
                    $this->io->writeln(sprintf('Remote entry %s synced.', $contentfulEntry->getId()));
                }
            } elseif ($remoteEntry instanceof DeletedEntry) {
                $this->contentful->deleteContentfulEntry($remoteEntry);
                $this->io->writeln(sprintf('Remote entry %s deleted.', $remoteEntry->getId()));
            }
        }
    }
593458
private void refreshStash() throws ObjectSourceException {
        if (!stash.isEmpty()) {
            return;
        }
        try {
            if (SEARCH_NOT_STARTED.equals(token)) {
                beginSearch();
            } else if (token != null) {
                resumeSearch();
            }
        } catch (RemoteException e) {
            throw new ObjectSourceException(e);
        }
    }
395435
def refresh(self):
        """"""
        if self.refresh_token is None:
            raise InvalidInvocation("refresh token not provided")
        self._request_token(
            grant_type="refresh_token", refresh_token=self.refresh_token
        )
1360012
def refresh_from_server(self):
        """"""
        group = self.manager.get(id=self.id)
        self.__init__(self.manager, **group.data)
1275832
public void onClickRemote(NotificationRemote remote, NotificationEntry entry) {
        if (DBG) Log.v(TAG, "onClickRemote - " + entry.ID);
    }
1245121
@InterfaceAudience.Private
    private void refreshRemoteCheckpointDoc() {
        Log.i(Log.TAG_SYNC, "%s: Refreshing remote checkpoint to get its _rev...", this);
        Future future = sendAsyncRequest("GET", "_local/" + remoteCheckpointDocID(), null, new RemoteRequestCompletion() {
            @Override
            public void onCompletion(RemoteRequest remoteRequest, Response httpResponse, Object result, Throwable e) {
                if (db == null) {
                    Log.w(Log.TAG_SYNC, "%s: db == null while refreshing remote checkpoint.  aborting", this);
                    return;
                }
                if (e != null && Utils.getStatusFromError(e) != Status.NOT_FOUND) {
                    Log.e(Log.TAG_SYNC, "%s: Error refreshing remote checkpoint", e, this);
                } else {
                    Log.d(Log.TAG_SYNC, "%s: Refreshed remote checkpoint: %s", this, result);
                    remoteCheckpoint = (Map<String, Object>) result;
                    lastSequenceChanged = true;
                    saveLastSequence();  // try saving again
                }
            }
        });
        pendingFutures.add(future);
    }
1095444
private function buildContentfulEntry(Entry $remoteEntry, string $id): ContentfulEntry
    {
        $contentfulEntry = new ContentfulEntry($remoteEntry);
        $contentfulEntry->setIsPublished(true);
        $contentfulEntry->setJson((string) json_encode($remoteEntry));

        $route = new Route();
        $route->setName($id);
        $route->setStaticPrefix($this->entrySlugger->getSlug($contentfulEntry));
        $route->setDefault(RouteObjectInterface::CONTENT_ID, ContentfulEntry::class . ':' . $id);
        $route->setContent($contentfulEntry);
        $contentfulEntry->addRoute($route); // Create the back-link from content to route

        $this->entityManager->persist($contentfulEntry);
        $this->entityManager->persist($route);
        $this->entityManager->flush();

        return $contentfulEntry;
    }
1194447
@Transactional
    public void refresh(E entity) {
        if (entityManager.contains(entity)) {
            entityManager.refresh(entity);
        }
    }
1122058
public void refresh() {
        this.getRefreshLock().writeLock().lock();

        try {
            this.authenticate();
        } catch (BoxAPIException e) {
            this.notifyError(e);
            this.getRefreshLock().writeLock().unlock();
            throw e;
        }

        this.notifyRefresh();
        this.getRefreshLock().writeLock().unlock();
    }
1283414
private void refresh() {
        try {
            // Invoke underlying getTuples unsynchronized.
            // This way it won't block tuple access, in case it is a long
            // running or expensive function.
            final CompletableFuture<? extends Collection<ResolverTuple>> fut = underlying.getTuples();

            // Publish future, needs synchronization, so close() method can cancel properly.
            synchronized(this) {
                // We create the whenCompleteAsync continuation with synchronization locked,
                // because the update code will want to clear the currentFut member-variable.
                // We must ensure it is set before.
                currentFut = fut.whenCompleteAsync(this::update, SCHEDULER);

                if (closed)  // Close may have set close bit while we were creating future.
                    fut.cancel(false);
            }
        } catch (Exception ex) {
            synchronized(this) {
                exception = ex;
            }
            reschedule(FAILURE_RESCHEDULE_DELAY);
        }
    }
635979
@Override
    public void onTokenRefresh() {
        Intent intent = new Intent(ACTION_REFRESH_PUSH);
        LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent);
    }
1199786
public function setRemoteEntry(Entry $remoteEntry): void
    {
        $this->remoteEntry = $remoteEntry;
        $this->id = $this->remoteEntry->getSpace()->getId() . '|' . $this->remoteEntry->getId();

        $contentType = $this->remoteEntry->getContentType();
        if ($contentType === null) {
            return;
        }

        $nameField = $contentType->getDisplayField();
        if ($nameField === null) {
            return;
        }

        /** @var callable $callable */
        $callable = [$remoteEntry, 'get' . $nameField->getId()];
        $this->name = call_user_func($callable);
    }
231552
def refresh(self):
        
        resp = self._imgur._send_request(self._INFO_URL)
        self._populate(resp)
        self._has_fetched = True