Requests a restore from the primary.
483276
private void requestRestore(MemberId primary) {
    context.protocol().restore(primary, RestoreRequest.request(context.descriptor(), context.currentTerm()))
        .whenCompleteAsync((response, error) -> {
          if (error == null && response.status() == PrimaryBackupResponse.Status.OK) {
            context.resetIndex(response.index(), response.timestamp());

            Buffer buffer = HeapBuffer.wrap(response.data());
            int sessions = buffer.readInt();
            for (int i = 0; i < sessions; i++) {
              context.getOrCreateSession(buffer.readLong(), MemberId.from(buffer.readString()));
            }

            context.service().restore(new DefaultBackupInput(buffer, context.service().serializer()));
            operations.clear();
          }
        }, context.threadContext());
  }
731182
public void restore(ObjectInputStream ois, int dataVersion)
  throws SevereMessageStoreException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc,
        "restore",
        new Object[] { ois, new Integer(dataVersion) });

   // checkPersistentVersionId(dataVersion);
    if (dataVersion > getPersistentVersion())
    {

      SibTr.error(tc, "ITEM_RESTORE_ERROR_CWSIP0261",
        new Object[] {new Integer(getPersistentVersion()),
                      new Integer(dataVersion)});

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "restore", "SIErrorException");

      throw new SevereMessageStoreException(
        nls.getFormattedMessage(
          "ITEM_RESTORE_ERROR_CWSIP0261",
          new Object[] {new Integer(getPersistentVersion()),
                        new Integer(dataVersion) },
          null));
    }

    BaseDestinationHandler baseDestHandler = null;

    PubSubMessageItemStream mis = (PubSubMessageItemStream)getItemStream();
    baseDestHandler  = (BaseDestinationHandler)mis.getItemStream();
    if (baseDestHandler != null) _destinationManager = baseDestHandler.getDestinationManager();

    // F001333-14610
    // Make sure we set the durable flag on our subState
    _subState.setDurable(true);

    //first we initialize the persistent data
    try
    {
      HashMap hm = (HashMap)ois.readObject();
      _subState.setSubscriberID((String)hm.get("subscriberID"));
      _subState.setTopicSpaceUuid(new SIBUuid12((String)hm.get("topicspace")));
      _subState.setTopicSpaceName((String)hm.get("topicspaceName"));
      _subState.setTopicSpaceBusName((String)hm.get("topicspaceBusName"));
      toBeDeleted = ((Boolean)hm.get("isToBeDeleted")).booleanValue();

      boolean isSIBServerSubject = ((Boolean)hm.get("isSIBServerSubject")).booleanValue();
      _subState.setUser((String)hm.get("user"), isSIBServerSubject);
      _topics = (String[])hm.get("topics");
      _subState.setIsCloned(((Boolean)hm.get("isCloned")).booleanValue());
      _subState.setNoLocal(((Boolean)hm.get("isNoLocal")).booleanValue());

      // selectorStrings and domains arrived in version 1 of DurableSubscriptionItemStreams
      if( dataVersion < 2 )
      {
        if (_selectors == null)
          this._selectors = new String[1];

        if (_domains == null)
          this._domains = new int[1];

        this._selectors[0] = (String)hm.get("selectorstring");
        this._domains[0] = ((Integer)hm.get("selectordomain")).intValue();
      }
      else
      {
        _subState.setTargetDestination((String)hm.get("targetDestination"));
        this._selectors = (String[])hm.get("selectors");
        this._domains = (int[])hm.get("domains");
        this._selectorProperties = (HashMap[])hm.get("selectorProperties");
        this._subState.setUserData((HashMap)hm.get("userData"));        
      }
      
      // SelectorProperties arrived in version 2 of DurableSubscriptionItemStreams
      if( dataVersion < PERSISTENT_VERSION)
      {
        if(_selectorProperties == null)
          this._selectorProperties = new HashMap[1];        
      }
      else
      {
        this._selectorProperties = (HashMap[])hm.get("selectorProperties");
      }
    }
    catch (Exception e)
    {
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.impl.store.itemstreams.DurableSubscriptionItemStream.restore",
        "1:434:1.95",
        this);

      SibTr.exception(tc, e);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "restore", e);

      throw new SIErrorException(
        nls.getFormattedMessage(
        "SUBSCRIPTION_WARM_START_ERROR_CWSIP0148",
        new Object[] { _destinationManager.getLocalME().getMessagingEngineName(), e },
          null),
        e);
    }

    if(baseDestHandler==null || _destinationManager==null)
    {
      //MP has not been initialized so we must put the stream into doubt
      _inDoubt=true;
    }
    else
    {
      initializeNonPersistent(baseDestHandler);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "restore");
  }
489917
public function restore()
    {
        if ($this->backup instanceof NotSet) {
            if (is_file($this->name)) {
                unlink($this->name);
            }
        } else {
            file_put_contents($this->name, $this->backup);
        }
    }
76206
def req(self, method, params=()):
        """"""

        response = self.session.post(
            self.url,
            data=json.dumps({"method": method, "params": params, "jsonrpc": "1.1"}),
        ).json()

        if response["error"] is not None:
            return response["error"]
        else:
            return response["result"]
1060708
public BoxRequestsFile.RestoreTrashedFile getRestoreTrashedFileRequest(String id) {
        BoxRequestsFile.RestoreTrashedFile request = new BoxRequestsFile.RestoreTrashedFile(id, getFileInfoUrl(id), mSession);
        return request;
    }
299779
public CompletableFuture<RestoreResponse> restore(RestoreRequest request) {
    logRequest(request);
    return CompletableFuture.completedFuture(logResponse(RestoreResponse.error()));
  }
1309928
public void restore(ObjectInputStream din, int dataVersion)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc, "restore", new Object[] { din, Integer.valueOf(dataVersion) });
    
    checkPersistentVersionId(dataVersion);

    try
    {
      remoteMEId = new SIBUuid8(din.readUTF());
      streamId = new SIBUuid12(din.readUTF()); 
      if (dataVersion > 1)
      {
        String id = din.readUTF();
        if (!id.equals(NULL))
          gatheringTargetDestUuid = new SIBUuid12(id);
      }
    }
    catch (Exception e)
    {
      // No FFDC code needed
      SIErrorException e2 = new SIErrorException(e);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "restore", e2);

      throw e2;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "restore");
  }
939535
def set_primary(self, **params):
        """"""
        data = self.api_client.set_primary_account(self.id, **params)
        self.update(data)
        return data
887188
def restore(options = {:recursive => true})
      return false unless destroyed?

      with_transaction_returning_status do
        run_callbacks(:restore) do
          restore_associated_records if options[:recursive]
          update_column kakurenbo_column, nil
          self
        end
      end
    end
804828
void reinitializeIfNecessary(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
    {
        if (_servletContext == null) {
            reinitialize(request, response, servletContext);
        }
    }
523837
public function restore()
    {
        if ($this->backup instanceof NotSet) {
            unset($_SERVER[$this->name]);
        } else {
            $_SERVER[$this->name] = $this->backup;
        }
    }
1331326
private function restoreBackup()
    {
        $hash       = $this->getHash();
        $connection = $this->entityManager->getConnection();

        $this->backupService->restoreBackup($connection, $hash);
    }
360733
def retrieve(cls, *args, **kwargs):
        """"""
        return super(ApplicationFeeRefund, cls).retrieve(*args, **kwargs)
919628
private function restore() {
        if (!HTTPCookie::exists($this->name)) return (object)[];
        
        return json_decode(Text::unlock(HTTPCookie::get($this->name)));
    }
726139
public function actionRestore()
    {
        $post = Yii::$app->request->post();
        $query = new Query;
        $audit = $query
            ->from("audits.{$post['table']}")
            ->where('audit_id = :audit_id', ['audit_id' => $post['audit_id']])
            ->one();
        $this->setCurrentModel($post['table']);
        $criteria = [];
        /** @var \yii\db\ActiveRecord $model */
        $model = $this->_currentModel;
        foreach ($model->primaryKey() as $primaryKey) {
            $criteria[$primaryKey] = $audit[$primaryKey];
        }
        foreach ($this->module->tables[$post['table']]['updateSkip'] as $column) {
            if (isset($audit[$column])) {
                unset($audit[$column]);
            }
        }
        /** @var \yii\db\ActiveRecord $record */
        $record = $model->findOne($criteria);
        $record->setAttributes($audit, false);
        if ($record->save()) {
            Yii::$app->session->setFlash('success', Yii::t('app', 'Record has been restored.'));
        } else {
            Yii::$app->session->setFlash('danger', Yii::t('app', 'Failed to restore record.'));
        }
        return $this->redirect(Yii::$app->request->referrer);
    }
570587
def restore(self, volume_id, **kwargs):
        
        # These arguments are required
        self.required('create', kwargs, ['backup', 'size'])
        # Optional Arguments
        volume_id = volume_id or str(uuid.uuid4())
        kwargs['volume_type_name'] = kwargs['volume_type_name'] or 'vtype'
        kwargs['size'] = kwargs['size'] or 1
        # Make the request
        return self.http_put('/volumes/%s' % volume_id,
                             params=self.unused(kwargs))
871257
public static function restore()
    {
        if (is_null(self::$intStoredErrorLevel)) {
            throw new Caller('Error handler is not currently overridden.  Cannot reset something that was never overridden.');
        }
        if (self::$intStoredErrorLevel != -1) {
            error_reporting(self::$intStoredErrorLevel);
        }
        restore_error_handler();
        self::$intStoredErrorLevel = null;
    }