Returns {@code true} if the keys are not loaded yet, promoting this key
loader and resetting the loading state if necessary in the process.
If this gets invoked on SENDER BACKUP it means the SENDER died and
SENDER BACKUP takes over.
767218
public boolean shouldDoInitialLoad() {
        if (role.is(Role.SENDER_BACKUP)) {
            // was backup. become primary sender
            role.next(Role.SENDER);

            if (state.is(State.LOADING)) {
                // previous loading was in progress. cancel and start from scratch
                state.next(State.NOT_LOADED);
                keyLoadFinished.setResult(false);
            }
        }

        return state.is(State.NOT_LOADED);
    }
364206
@Override
    public boolean isEmpty() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.entry(this, tc, "isEmpty");
        synchronized (getMessageLockArtefact()) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                JmfTr.exit(this, tc, "isEmpty");
            return super.isEmpty();
        }
    }
1297198
protected boolean keyReleased (KeyEvent e)
    {
        logKey("keyReleased", e);

        // get the info object for this key
        KeyInfo info = _keys.get(e.getKeyCode());
        if (info != null) {
            // remember the last time we received a key release
            info.setReleaseTime(RunAnywhere.getWhen(e));
        }

        // notify any key observers of the key release
        notifyObservers(KeyEvent.KEY_RELEASED, e.getKeyCode(), RunAnywhere.getWhen(e));

        return (info != null);
    }
967527
protected function checkLazyLoad()
    {
        if ($this->lazyLoadInitiated === true) {
            return;
        }

        $this->lazyLoad();
        $this->generateKeys();

        $this->lazyLoadInitiated = true;
    }
393816
@Override public boolean isReleasable() {
    int r = _rwlock.get();
    if( _key.home() ) {         // Called from lock_and_invalidate
      // Home-key blocking: wait for active-GET count to fall to zero, or blocking on deleted object
      return r <= 0;
    } else {                    // Called from start_put
      // Remote-key blocking: wait for active-PUT lock to hit -1
      assert r == 2 || r == -1; // Either waiting (2) or done (-1) but not started(1)
      return r == -1;           // done!
    }
  }
14550
public synchronized boolean setToSuspended()
    {
        if ( state.get() != State.STARTED )
        {
            return false;
        }

        if ( (currentConnectionState == ConnectionState.LOST) || (currentConnectionState == ConnectionState.SUSPENDED) )
        {
            return false;
        }

        currentConnectionState = ConnectionState.SUSPENDED;
        postState(ConnectionState.SUSPENDED);

        return true;
    }
982395
public boolean load() {
        if ((lastLoaded + cacheTTLMillis) <= System.currentTimeMillis()) {
            clearCache();
        }
        if (!readCache()) {
            if (shouldReadDataFromFallback()) {
                return loadFallback();
            }
        }
        return true;
    }
433485
@Override
    public boolean containsKey(Object key) {
        if (key == null) {
            throw new NullPointerException();
        }
        
        CachedValue<K, V> entry = map.get(key);
        if (entry == null) {
            return false;
        }
        if (isValueExpired(entry)) {
            if (map.remove(key, entry)) {
                onValueRemove(entry);
                return false;
            }
            return containsKey(key);
        }
        return true;
    }
221268
private boolean jobHasFinishedStatus() {

		final Iterator<ExecutionVertex> it = new ExecutionGraphIterator(this, true);

		while (it.hasNext()) {

			if (it.next().getExecutionState() != ExecutionState.FINISHED) {
				return false;
			}
		}

		return true;
	}
49130
public boolean isLoadable() {
		if (getPayload() instanceof NullPayload) {
			return false;
		}
		
		try {
			InputStream is = getInputStream();
			try {
				is.read();
				return true;
			} finally {
				is.close();
			}
		} catch (IOException ex) {
			return false;
		}
	}
516961
private boolean jobHasFailedOrCanceledStatus() {

		final Iterator<ExecutionVertex> it = new ExecutionGraphIterator(this, true);

		while (it.hasNext()) {

			final ExecutionState state = it.next().getExecutionState();

			if (state != ExecutionState.CANCELED && state != ExecutionState.FAILED && state != ExecutionState.FINISHED) {
				return false;
			}
		}

		return true;
	}
1190953
public boolean containsKey(Object key)
    {
        if (key==null)
            return _nullEntry!=null;
        return
            getEntry(key.toString(),0,key==null?0:key.toString().length())!=null;
    }
739794
public boolean isEmpty() {
        for (String key : data.keySet()) {
            if (!TS_KEY.equals(key)) {
                return false;
            }
        }
        return true;
    }
872911
protected boolean refreshToken() {
		long now = System.currentTimeMillis();
		boolean notExpired = tokenKeyExpires != null && tokenKeyExpires > now;
		boolean canRefresh = tokenKeyNextRefresh != null &&
				(tokenKeyNextRefresh < now || tokenKeyNextRefresh > tokenKeyExpires);
		// token present and NOT expired
		if (tokenKey != null && notExpired && canRefresh) {
			Map<String, Object> result = getEntity(invokeGet(JWT_PATH, null), Map.class);
			if (result != null && result.containsKey("user") && result.containsKey("jwt")) {
				Map<?, ?> jwtData = (Map<?, ?>) result.get("jwt");
				tokenKey = (String) jwtData.get("access_token");
				tokenKeyExpires = (Long) jwtData.get("expires");
				tokenKeyNextRefresh = (Long) jwtData.get("refresh");
				return true;
			} else {
				clearAccessToken();
			}
		}
		return false;
	}
570153
@Override
    public boolean containsKey(T key) {
        try {
            if (emulateIsAbsent)
                lock.readLock().lock();

            return compressedEntries.containsKey(key);
        } finally {
            if (emulateIsAbsent)
                lock.readLock().unlock();
        }
    }
820750
protected boolean needsToLoadCredentials() {
        if (credentials == null) return true;

        if (credentialsExpiration != null) {
            if (isWithinExpirationThreshold()) return true;
        }

        if (lastInstanceProfileCheck != null) {
            if (isPastRefreshThreshold()) return true;
        }

        return false;
    }
1164335
public void hasLastKey(@NullableDecl Object key) {
    if (actualAsNavigableMap().isEmpty()) {
      failWithActual("expected to have last key", key);
      return;
    }

    if (!Objects.equal(actualAsNavigableMap().lastKey(), key)) {
      if (actualAsNavigableMap().containsKey(key)) {
        failWithoutActual(
            simpleFact(
                lenientFormat(
                    "Not true that %s has last key <%s>. "
                        + "It does contain this key, but the last key is <%s>",
                    actualAsString(), key, actualAsNavigableMap().lastKey())));
        return;
      }
      failWithoutActual(
          simpleFact(
              lenientFormat(
                  "Not true that %s has last key <%s>. "
                      + "It does not contain this key, and the last key is <%s>",
                  actualAsString(), key, actualAsNavigableMap().lastKey())));
    }
  }