Determine if this key is ready
No need to synchronize as this should be called under the readyConsumerPointLock
163887
public boolean isKeyReady()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "isKeyReady");
    
    boolean returnValue = false;
    if(keyGroup == null)
      returnValue = ready;
    else
      //check if the ordering context is ready
      returnValue = keyGroup.isKeyReady();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "isKeyReady", Boolean.valueOf(returnValue));

    return returnValue;
  }
974895
@Override
    public boolean isReady() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "isReady", this.listener);
        
        //If the listener is not set then we have no way to know if we can read in a non-blocking manner
        //return true so we don't accidentally block an app who doesn't set a listener but calls isReady
        if(this.listener == null || isFinished()){
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                Tr.exit(tc, "isReady", "ReadListener not set or isFinished returned true");
            return true;
        }
        boolean isReady = false;

        //Synchronize to ensure that no two methods can overlap in here as that could cause issue
        synchronized (this.lockObj){
            //If asyncReadOutstanding returns true, it means we don't need to do this check
            //If checkAvailable returns true then it means data is available right now
            //If it returns false it means we need to check if data is available immediately
            //If data is available immediately it will be populated and we return true
            //If not then we return false and an async read is in progress or we're finished
            if(!asyncReadOutstanding){
                if(!checkAvailable()){
                    isReady = this.httpin.asyncCheckBuffers(this.callback);
                    if(!isReady){
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "asyncCheckBuffers returned false. An async read is now outstanding or no more data");
                        }
                        this.asyncReadOutstanding = true;
                    }
                } else
                    isReady = true;
            }
        }
        
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "isReady", isReady + " " + this.listener);
        return isReady;
    }
307512
def is_ready(self):
        
        try:
            ready, _, _ = self.select.select([self.fileno], [], [],
                                             POLL_TIMEOUT)
            return bool(ready)
        except self.select.error as why:
            if why.args[0] != EINTR:
                self._exceptions.append(AMQPConnectionError(why))
        return False
1108440
private void verifyKey(final String key) {

		if (!theKey.get().equals(key)) {
			try {
				throw new RuntimeException("Must have same key for Redis Pipeline in Dynomite. This key: " + key);
			} finally {
				discardPipelineAndReleaseConnection();
			}
		}
	}
1020737
public static boolean determineObject(String key) {
        if (!exists()) {
            throwThreadCacheNotInitializedException(key);
        }
        final Object obj = threadLocal.get().get(key);
        return obj != null && (boolean) obj;
    }
311245
def synchronized(cls, obj=None):
        

        def get_key(f, o):
            if o is None:
                key = hash(f)
            else:
                key = hash(o)
            return key

        def get_lock(f, o):
            key = get_key(f, o)
            if key not in cls.lock_map:
                with cls.lock_map_lock:
                    if key not in cls.lock_map:
                        cls.lock_map[key] = _init_lock()
            return cls.lock_map[key]

        def wrap(f):
            @functools.wraps(f)
            def new_func(*args, **kw):
                with get_lock(f, obj):
                    return f(*args, **kw)

            return new_func

        return wrap
35053
function wait(key, cb) {
    if (!waiting[key]) {
        waiting[key] = [];
    }

    waiting[key].push(cb);
}
1179847
@Override
  public void resync() {
    lock.writeLock().lock();
    try {
      if (this.knownObjects == null) {
        return;
      }

      List<String> keys = this.knownObjects.listKeys();
      for (String key : keys) {
        syncKeyLocked(key);
      }
    } finally {
      lock.writeLock().unlock();
    }
  }
832516
private boolean isKeysConfigChanged(String oldKeyImportFile, Long oldKeyTokenExpiration) {
        return ((oldKeyImportFile.equals(keyImportFile) == false) || (oldKeyTokenExpiration != keyTokenExpiration));
    }
1102280
boolean isReady() {
        final ContainerAddress[] ds = destinations.get();
        if (ds == null)
            return false;
        for (final ContainerAddress d : ds)
            if (d == null)
                return false;
        final boolean ret = ds.length != 0; // this method is only called in tests and this needs to be true there.

        if (ret && LOGGER.isDebugEnabled())
            LOGGER.debug("at {} to {} is Ready " + shorthand(ds), thisNodeId, clusterId);

        return ret;
    }
1365689
private boolean isAllOrDirtyOptLocking() {
		EntityMetamodel entityMetamodel = getEntityMetamodel();
		return entityMetamodel.getOptimisticLockStyle() == OptimisticLockStyle.DIRTY
				|| entityMetamodel.getOptimisticLockStyle() == OptimisticLockStyle.ALL;
	}
440940
private void syncKeyLocked(String key) {
    ApiType obj = this.knownObjects.getByKey(key);
    if (obj == null) {
      return;
    }

    String id = this.keyOf(obj);
    Deque<MutablePair<DeltaType, Object>> deltas = this.items.get(id);
    if (deltas != null && !(Collections.isEmptyCollection(deltas))) {
      return;
    }

    this.queueActionLocked(DeltaType.Sync, obj);
  }
25322
def is_locked(self, key):
        
        key = str(key)
        if key in self.__variable_locks:
            return self.__variable_locks[key].locked()
        return False
1187215
def _synced(method, self, args, kwargs):
    """"""
    with self._lock:
        return method(*args, **kwargs)
698270
private boolean isSyncCollectionCreation(int seen) {
        if (seen == Const.INVOKESPECIAL) {
            if (Values.CONSTRUCTOR.equals(getNameConstantOperand())) {
                return (syncCollections.contains(getClassConstantOperand()));
            }
        } else if ((seen == Const.INVOKESTATIC) && "java/util/Collections".equals(getClassConstantOperand())) {
            String methodName = getNameConstantOperand();
            return ("synchronizedMap".equals(methodName) || "synchronizedSet".equals(methodName));
        }
        return false;
    }
915773
public boolean isAsync() {
        return invokeType != null && (RpcConstants.INVOKER_TYPE_CALLBACK.equals(invokeType)
            || RpcConstants.INVOKER_TYPE_FUTURE.equals(invokeType));
    }
1328207
private boolean keyAlreadyExists(String newKey) {

        Collection<?> itemIds = m_table.getItemIds();
        for (Object itemId : itemIds) {
            if (m_table.getItem(itemId).getItemProperty(TableProperty.KEY).getValue().equals(newKey)) {
                return true;
            }
        }
        return false;
    }