Sets the currently executing request.
192541
void setRequest(HttpUriRequest request) {
    requestLock.lock();
    try {
      if (this.request != null) {
        throw new SparqlException("Command is already executing a request.");
      }
      this.request = request;
    } finally {
      requestLock.unlock();
    }
  }
587908
def SetAction(self, action, **kws):
        ""
        if hasattr(action,'__call__'):
            self.__action = Closure(action, **kws)
1093354
public function execute()
    {
        /** @var EventHandler $eventHandler */
        $eventHandler = $this->make(EventHandler::class);
        $eventHandler->trigger(BeforeExecute::class);

        /** @var Request $request */
        $request = $this->make(Request::class);
        $request->compute();
    }
1108249
public function setRequest(Request $request)
    {
        $this->request = $request;
        $this->context->registerInstance($request);
    }
1081395
public function setRequest(Request $request)
    {
        $this->request = $request;

        $this->cachedRoot = null;
        $this->cachedScheme = null;
        $this->routeGenerator = null;
    }
165994
private function setCurrentPage()
    {
        if ($this->perPage == 'all') return;

        if ($this->hasInput('page'))
        {
            $page_input = $this->getInput('page');

            if ($this->isValidPageNumber($page_input))
            {
                $this->page = $page_input;
            }
        }
    }
801501
public function setPutFromRequest()
    {
        if ($this->_put === null) {
            if ($_SERVER['REQUEST_METHOD'] == 'PUT') {
                $this->_put = file_get_contents("php://input");
            }
        } else {
            $this->_put = '';
        }
    }
977278
function setContext(req, res, next) {
    currentContext = {req: req, res: res};
    next();
}
541984
public void async() {
		final Request request = data.build();
		final CallbackHandler handler = request.handler != null ? request.handler : singleton.handler;
		final boolean safe = request.safe != null ? request.safe : singleton.safe;

		// Ignore current request if already running (ignoreIfRunning)
		synchronized (activeRequests) {
			if (ignoreIfRunning && activeRequests.contains(request.tag)) {
				singleton.log(request.tag + " request already running! Ignoring...");
				return;
			}
			activeRequests.add(request.tag);
		}

		new AsyncTask<Void, Void, Void>() {
			@Override
			protected Void doInBackground(Void... params) {
				try {
					// Delay thread if specified
					if (delay > 0) {
						singleton.log("Delaying " + request.tag + " request for " + delay + "ms");
						Thread.sleep(delay);
					}

					// Execute request
					try {
						singleton.load(request);
					} catch (IOException e) {
						singleton.log("Error executing request " + request.tag + " asynchronously! " + e.getMessage(), Log.ERROR);
						handler.onLoadFailed(safe, request.callback.get());
					}
				} catch (InterruptedException e) {
					singleton.log(request.tag + " thread interrupted!");
				} finally {
					synchronized (activeRequests) {
						activeRequests.remove(request.tag);
					}
				}
				return null;
			}

			@Override
			protected void onCancelled(Void aVoid) {
				super.onCancelled(aVoid);

				// Double check to make sure this request is removed
				synchronized (activeRequests) {
					activeRequests.remove(request.tag);
				}
			}
		}.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);
	}
569293
protected function setRequestQueryString()
    {
        $query = $this->request->getQuery();

        foreach ($this->queryStrings as $key => $value) {
            $query->set($key, $value);
        }
    }
1374554
def execute_request_handler(self):
        
        self._response_timeout_handler = self.loop.call_later(
            self.response_timeout, self.response_timeout_callback
        )
        self._last_request_time = time()
        self._request_handler_task = self.loop.create_task(
            self.request_handler(
                self.request, self.write_response, self.stream_response
            )
        )
1043805
@Override
  public void onAccept()
  {
    if (_request != null) {
      System.out.println("OLD_REQUEST: " + _request);
    }
    
    _sequenceClose.set(-1);
    /*
    _request = protocol().newRequest(this);
    _request.onAccept();
    */
  }
199816
public void setRequest(ModbusRequest req) {
        request = req;
        if (req != null) {
            request.setTransactionID(getTransactionID());
        }
    }
983167
@Override
  protected void doExecute(Task task, TermsByQueryRequest request, ActionListener<TermsByQueryResponse> listener) {
    request.nowInMillis(System.currentTimeMillis()); // set time to be used in scripts
    super.doExecute(task, request, listener);
  }
1220380
public void requestDone() {
        currentRequest = null;

        if (anyAreSet(state, CLOSE_REQ)) {
            safeClose(connection);
        } else if (anyAreSet(state, UPGRADE_REQUESTED)) {
            safeClose(connection); //we don't support upgrade, just close the connection to be safe
            return;
        }

        AjpClientExchange next = pendingQueue.poll();

        if (next != null) {
            initiateRequest(next);
        }
    }
998848
public function setRequestOnHandler($request)
    {
        if ($this->handlerNeedsRequest()) {
            /** @var NeedRequestInterface $handler */
            $handler = $this->getHandler();
            $handler->setRequest($request);
        }
    }
1204856
def set_to_public(self, request, queryset):
        
        queryset.update(is_public=True, modified=now())