Updates the (potentially stale) priority value cached in this object.
This should be called when this object is outside the queue.

@return true if the level changed.
172200
public boolean updateLevelPriority()
    {
        Priority newPriority = taskHandle.getPriority();
        Priority oldPriority = priority.getAndSet(newPriority);
        return newPriority.getLevel() != oldPriority.getLevel();
    }
484521
private boolean updateMemoryReservation()
    {
        // Operator/driver will be blocked on memory after we call localUserMemoryContext.setBytes().
        // If memory is not available, once we return, this operator will be blocked until memory is available.
        long memorySizeInBytes = groupByHash.map(GroupByHash::getEstimatedSize).orElse(0L) + partitionRowCount.sizeOf();
        localUserMemoryContext.setBytes(memorySizeInBytes);
        // If memory is not available, inform the caller that we cannot proceed for allocation.
        return operatorContext.isWaitingForMemory().isDone();
    }
1355612
@Override
    protected void applyValueUpdate(final T value) throws NotAvailableException {

        if(value == null) {
            throw new NotAvailableException("Value");
        }

        synchronized (VALUE_LOCK) {
            this.value = value;
            this.valueFuture.complete(value);
            VALUE_LOCK.notifyAll();
        }
    }
37143
@Override
	public void tableUpdated() {
		super.tableUpdated();
		synchronized(unsortedRowsCacheLock) {
			unsortedRowsCache = null;
		}
		synchronized(sortedRowsCacheLock) {
			sortedRowsCache = null;
		}
		synchronized(rowCacheLock) {
			rowCacheLoaded = false;
			rowCache.clear();
		}
	}
1334518
@SuppressWarnings("unchecked")
	protected boolean triggerRefreshIfNeeded(final Element e){
		if (refreshAheadNeeded(e.getLastAccessTime(), e.getCreationTime(), e.getExpirationTime())){
			// to apply a simple and not strict concurrency locking
			final long signature = Thread.currentThread().getId() * 1000000L + (System.currentTimeMillis() % 1000000L);
			if (e.getVersion() == 1){	// 1 is the default value of version field
				e.setVersion(signature);
				if (e.getVersion() == signature){	// double check
					threadPool.execute(new Runnable(){
						public void run(){
							if (e.getVersion() == signature){	// triple check
								try{
									V newValue = getDirectly((K)e.getObjectKey());
									if (newValue == null){
										cache.remove(e.getObjectKey());
									}else{
										cache.put(new Element((K)e.getObjectKey(), newValue));
									}
								}catch(Exception ex){
									logger.warn("Failed to update the value associated with specified key '{}' in cache '{}'", e.getObjectKey(), cache.getName(), ex);
								}
							}
						}
					});
					return true;
				}
			}
		}
		return false;
	}
511173
@Override
	public void update() {
		synchronized (this) {
			long currentTime = System.currentTimeMillis();
			if (currentTime - lastUpdateTime > updateInterval) {
				lastUpdateTime = currentTime;
				fetchMetrics();
			}
		}
	}
689448
@Override
	public boolean update() {
        for (CallbackListener callbackListener : this.callbackListeners) {
            callbackListener.beforeUpdate(this);
        }
		boolean ret = super.update();
		if (this.syncToRedis && ret) {
			this.saveToRedis();
		}
        for (CallbackListener callbackListener : this.callbackListeners) {
            callbackListener.afterUpdate(this);
        }
		return ret;
	}
877246
@Override
	public boolean next() {
		if (currentScan != null) {
			if (currentScan == s1)
				hasMore1 = s1.next();
			else if (currentScan == s2)
				hasMore2 = s2.next();
		}

		if (!hasMore1 && !hasMore2)
			return false;
		else if (hasMore1 && hasMore2) {
			// update currentScan
			currentScan = comp.compare(s1, s2) < 0 ? s1 : s2;
		} else if (hasMore1)
			currentScan = s1;
		else if (hasMore2)
			currentScan = s2;
		return true;
	}
694666
private void updateValue() {
        if (table != null) {
            int oldCount = this.count;
            this.count = table.getSelectedRowCount();
            maybeNotifyListeners(oldCount, count);
        }
    }
466209
private boolean updateThrottle() {

    // Derive new throttle state
    final ThrottleState newThrottle;
    final boolean flapping = flapController.isFlapping();
    if (imageFailure != null) {
      // Image failures take precedence
      newThrottle = imageFailure;
    } else {
      newThrottle = flapping ? FLAPPING : NO;
    }

    // If the throttle state changed, propagate it
    final boolean updated;
    if (!Objects.equals(throttle, newThrottle)) {
      log.info("throttle state change: {}: {} -> {}", jobId, throttle, newThrottle);
      throttle = newThrottle;
      statusUpdater.setThrottleState(throttle);
      updated = true;
    } else {
      updated = false;
    }

    // If we're flapping, schedule a future check to potentially reset the flapping state
    if (flapping) {
      if (flapTimeout != null) {
        flapTimeout.cancel(false);
      }
      flapTimeout = scheduler.schedule(new UpdateThrottle(),
          flapController.millisLeftToUnflap(), MILLISECONDS);
    }

    // Let the caller know if they need to commit the state change
    return updated;
  }
769504
@Override
    public final boolean retainAll(Collection<?> c) {
        this.writeLock.lock();
        try {
            int newSize = 0;
            for (final Queue<T> queue : this.keyedQueues.values()) {
                queue.retainAll(c);
                newSize += queue.size();
            }

            // Update the queue size
            final int oldSize = this.size;
            this.size = newSize;

            // If the updated size and old size differ things changed
            return this.size != oldSize;
        } finally {
            this.writeLock.unlock();
        }
    }
1004127
public boolean hasCapacity(int priority)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "hasCapacity", ""+priority);

      boolean result;
      synchronized(queueMonitor)
      {
         result = priority >= lowestPriorityWithCapacity;
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "hasCapacity", ""+result);
      return result;
   }
492457
private boolean doTryUpdateNoLock(S storable) {
        S existing = mMap.get(new Key<S>(storable, mFullComparator));
        if (existing == null) {
            return false;
        } else {
            // Copy altered values to existing object.
            existing.markAllPropertiesDirty();
            storable.copyDirtyProperties(existing);
            existing.markAllPropertiesClean();

            // Copy all values to user object, to simulate a reload.
            storable.markAllPropertiesDirty();
            existing.copyAllProperties(storable);
            storable.markAllPropertiesClean();

            return true;
        }
    }
362286
public boolean commit() {
        try {
            setWrongValueMessage(null);
            propInfo.setPropertyValue(target, getValue());
            updateValue();
            return true;
        } catch (Exception e) {
            setWrongValueException(e);
            return false;
        }
    }
898044
public void update() {
		if (done) {
			return;
		}
		
		int processed = AL10.alGetSourcei(source, AL10.AL_BUFFERS_PROCESSED);
		
		while (processed > 0) {
			unqueued.clear();
			
			AL10.alSourceUnqueueBuffers(source, unqueued);
	        if (stream(unqueued.get(0))) {
	        	AL10.alSourceQueueBuffers(source, unqueued);
	        } else {
	        	remainingBufferCount--;
	        	if (remainingBufferCount == 0) {
	        		done = true;
	        	}
	        }
	        processed--;
		}
		
		int state = AL10.alGetSourcei(source, AL10.AL_SOURCE_STATE);
	    
	    if (state != AL10.AL_PLAYING) {
	    	AL10.alSourcePlay(source);
	    }
	}
432874
public void setPriority (byte priority)
    {
        info.priority = (byte)Math.max(
            Byte.MIN_VALUE, Math.min(Byte.MAX_VALUE, priority));
    }
1297188
public boolean update(){
		boolean b = getForecast(String.valueOf(getLatitude()), String.valueOf(getLongitude()));
		return b;
	}