Updates the priority of an element.

        :raises: ValueError -- No such element in the priority queue.
351001
def reprioritize(self, priority, element):
        
        if element not in self.element_finder:
            raise ValueError("No such element in the priority queue.")
        entry = self.element_finder[element]
        self.add_element(priority, element, entry[1])
        entry[1] = self.INVALID
311367
protected void moveUp(int pos)
  {
//    if (tc.isEntryEnabled())
//      SibTr.entry(tc, "moveUp", new Integer(pos));

    PriorityQueueNode node = elements[pos];
    long priority = node.priority;

    while ((pos > 0) && (elements[parent(pos)].priority > priority))
    {
      setElement(elements[parent(pos)], pos);
      pos = parent(pos);
    }

    setElement(node, pos);

//    if (tc.isEntryEnabled())
//      SibTr.exit(tc, "moveUp");
  }
33522
def put(self, item):
        
        check_not_none(item, "Value can't be None")
        element_data = self._to_data(item)
        return self._encode_invoke(queue_put_codec, value=element_data)
602378
def additem(self, key, value):
        
        if key in self._position:
            raise KeyError('%s is already in the queue' % repr(key))
        self[key] = value
499978
async def update_status(self):
        
        if self._operation.async_url:
            self._response = await self.request_status(self._operation.async_url)
            self._operation.set_async_url_if_present(self._response)
            self._operation.get_status_from_async(self._response)
        elif self._operation.location_url:
            self._response = await self.request_status(self._operation.location_url)
            self._operation.set_async_url_if_present(self._response)
            self._operation.get_status_from_location(self._response)
        elif self._operation.method == "PUT":
            initial_url = self._operation.initial_response.request.url
            self._response = await self.request_status(initial_url)
            self._operation.set_async_url_if_present(self._response)
            self._operation.get_status_from_resource(self._response)
        else:
            raise BadResponse("Unable to find status link for polling.")
437062
def priority=(new_val = @priority)
      return nil if new_val == @priority
      raise JSS::InvalidDataError, "priority must be an integer between #{POSSIBLE_PRIORITIES.first} and #{POSSIBLE_PRIORITIES.last} (inclusive)" unless POSSIBLE_PRIORITIES.include? new_val
      @priority = new_val
      @need_to_update = true
    end
1241486
def update(self, iterable):
        """"""
        _lists = self._lists
        _maxes = self._maxes
        values = sorted(iterable)

        if _maxes:
            if len(values) * 4 >= self._len:
                values.extend(chain.from_iterable(_lists))
                values.sort()
                self._clear()
            else:
                _add = self.add
                for val in values:
                    _add(val)
                return

        _load = self._load
        _lists.extend(values[pos:(pos + _load)]
                      for pos in range(0, len(values), _load))
        _maxes.extend(sublist[-1] for sublist in _lists)
        self._len = len(values)
        del self._index[:]
791978
def update(self, value):
        
        self.update_internal(value)
        self.emit('changed', self.get_widget_value())
514852
def update(self):
        
        con = self.subpars.pars.control
        self(con.eqi1*con.tind)
1158070
def insert(self, item, priority):
        
        heappush(self.heap, HeapItem(item, priority))
836415
def updateitem(self, key, new_val):
        
        if key not in self._position:
            raise KeyError(key)
        self[key] = new_val
164486
def push(self, el):
        
        count = next(self.counter)
        heapq.heappush(self._queue, (el, count))
993815
def refresh(self):
        '''
        
        '''
        d = self.rr.table(self.table).get(self.pk_value).run()
        if d is None:
            raise KeyError
        for k in d:
            dict.__setitem__(
                    self, k, watch(d[k], callback=self._updated, field=k))
584993
def _update_sorting(self):
        
        key = self.key
        sorted_tops = self.sorted_tops
        tops = self.tops
        iterators = self.iterators
        for idx in self.idxs:
            try:
                tops[idx] = next(iterators[idx])
                top_key = key(tops[idx])
                if top_key not in sorted_tops:
                    sorted_tops[top_key] = []
                sorted_tops[top_key].append(idx)
            except StopIteration:
                pass
        if len(sorted_tops) == 0:
            raise StopIteration
        key, self.idxs = sorted_tops.popitem(last=False)
        self.c_idx = 0
788803
public final synchronized void setPriority(byte priority) {
		if (this.priority == priority) return;
		if (status == STATUS_STARTED_READY) {
			if (manager.remove(this)) {
				this.priority = priority;
				while (manager.getTransferTarget() != null)
					manager = manager.getTransferTarget();
				manager.addReady(this);
				return;
			}
		}
		this.priority = priority;
	}
1030515
def _update_priority(self, task, prio, worker):
        
        task.priority = prio = max(prio, task.priority)
        for dep in task.deps or []:
            t = self._state.get_task(dep)
            if t is not None and prio > t.priority:
                self._update_priority(t, prio, worker)
300898
def update(self):
        
        return self._put_request(
            data=self.element_to_string(
                self.encode()
            ),
            endpoint=self.ENDPOINT + '/' + str(self.id)
        )