Gets whether the datacontext provider is already open / ready or if it
has to be created.

@return a boolean indicating if the datacontext provider is open
18335
public final boolean isDatastoreConnectionOpen() {
        if (_datastoreConnectionRef == null) {
            return false;
        }
        final UsageAwareDatastoreConnection<E> dataContextProvider = _datastoreConnectionRef.get();
        return isDataContextProviderOpen(dataContextProvider);
    }
797995
private ViewableContext getViewableContext() {
        final Set<ViewableContext> customProviders =
                Providers.getCustomProviders(injectionManager, ViewableContext.class);
        if (!customProviders.isEmpty()) {
            return customProviders.iterator().next();
        }
        return Providers.getProviders(injectionManager, ViewableContext.class).iterator().next();
    }
384805
public static boolean isInitialized() {
    final boolean loaded =
        JQueryResources.rememberEvent != null || StringUtils.isEmpty(JQueryResources.JQUERY_URL);
    return loaded || JQueryResources.isInHeader();
  }
696019
public static boolean isAllReady() throws IOException, InterruptedException {
        for (RestartListener listener : all()) {
            if (!listener.isReadyToRestart())
                return false;
        }
        return true;
    }
1009974
public boolean isJCAImportedAndPrepared(String providerId) {
        return _JCARecoveryData != null &&
               _status.getState() == TransactionState.STATE_PREPARED &&
               _JCARecoveryData.getWrapper().getProviderId().equals(providerId);
    }
795357
public boolean isRowStatePreserved()
    {
        Boolean b = (Boolean) getStateHelper().get(PropertyKeys.rowStatePreserved);
        return b == null ? false : b.booleanValue(); 
    }
617957
public boolean isReadyForNext() {
        if (objectMapper == null)
            objectMapper = new ObjectMapper();

        try {
            int masterStream = Integer.parseInt(ndarraySendUrl.split(":")[2]);
            SubscriberState subscriberState =
                            objectMapper.readValue(Unirest
                                            .get(String.format("http://%s:%d/state/%d", masterStatusHost,
                                                            masterStatusPort, masterStream))
                                            .asJson().getBody().toString(), SubscriberState.class);
            return subscriberState.isReady();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }
417300
public boolean isDataSourceModeSupported() {
	String id = getHandlerID(session.transferMode, session.transferType, SOURCE);
	return (dataHandlers.get(id) != null);
    }
1226200
public boolean waitForReady() throws InterruptedException {
        // wait for the framework to be set.
        if (waitForFramework() == null) {
            return false;
        }

        frameworkLaunched.await();
        if (!frameworkLaunchSuccess) {
            return false;
        }

        // Now look for the FrameworkReady service in the service registry
        Collection<ServiceReference<FrameworkReady>> readyServiceRefs;
        try {
            readyServiceRefs = systemBundleCtx.getServiceReferences(FrameworkReady.class, null);
        } catch (InvalidSyntaxException e) {
            throw new IllegalStateException(e); // unlikely.
        } catch (IllegalStateException ex) {
            // The framework might have been stopped before we finished starting
            if (framework.getState() != Bundle.ACTIVE) {
                waitForFrameworkStop();
                return false;
            } else {
                throw ex;
            }
        }

        // If we have any, we will wait for them...
        if (readyServiceRefs != null) {
            for (ServiceReference<FrameworkReady> readyServiceRef : readyServiceRefs) {
                FrameworkReady ready = systemBundleCtx.getService(readyServiceRef);
                if (ready != null) {
                    ready.waitForFrameworkReady();
                }
            }
        }
        // Check if some component declared a fatal start error by initiating
        // framework stop before we were fully started.  If so, wait for the
        // framework to finish stopping, then report an error.
        if (framework.getState() != Bundle.ACTIVE) {
            waitForFrameworkStop();
            return false;
        }

        return true;
    }
817391
public synchronized boolean hasNext()
    {
        try
        {
            if (!isHasCalledCheck())
            {
                setHasCalledCheck(true);
                setHasNext(getRsAndStmt().m_rs.next());
                if (!getHasNext())
                {
                    autoReleaseDbResources();
                }
            }
        }
        catch (Exception ex)
        {
            setHasNext(false);
            autoReleaseDbResources();
            if(ex instanceof ResourceClosedException)
            {
                throw (ResourceClosedException)ex;
            }
            if(ex instanceof SQLException)
            {
                throw new PersistenceBrokerSQLException("Calling ResultSet.next() failed", (SQLException) ex);
            }
            else
            {
               throw new PersistenceBrokerException("Can't get next row from ResultSet", ex);
            }
        }
        if (logger.isDebugEnabled())
            logger.debug("hasNext() -> " + getHasNext());

        return getHasNext();
    }
644765
public boolean areAnyOpen() {
        //==========================================================================//
        //============== Describe Spot Instance Requests to determine =============//
        //==========================================================================//

        // Create the describeRequest with tall of the request id to monitor (e.g. that we started).
        DescribeSpotInstanceRequestsRequest describeRequest = new DescribeSpotInstanceRequestsRequest();
        describeRequest.setSpotInstanceRequestIds(spotInstanceRequestIds);

        System.out.println("Checking to determine if Spot Bids have reached the active state...");

        // Initialize variables.
        instanceIds = new ArrayList<String>();

        try
        {
            // Retrieve all of the requests we want to monitor.
            DescribeSpotInstanceRequestsResult describeResult = ec2.describeSpotInstanceRequests(describeRequest);
            List<SpotInstanceRequest> describeResponses = describeResult.getSpotInstanceRequests();

            // Look through each request and determine if they are all in the active state.
            for (SpotInstanceRequest describeResponse : describeResponses) {
                System.out.println(" " +describeResponse.getSpotInstanceRequestId() +
                                   " is in the "+describeResponse.getState() + " state.");

                // If the state is open, it hasn't changed since we attempted to request it.
                // There is the potential for it to transition almost immediately to closed or
                // cancelled so we compare against open instead of active.
                if (describeResponse.getState().equals("open")) {
                    return true;
                }

                // Add the instance id to the list we will eventually terminate.
                instanceIds.add(describeResponse.getInstanceId());
            }
        } catch (AmazonServiceException e) {
            // Print out the error.
            System.out.println("Error when calling describeSpotInstances");
            System.out.println("Caught Exception: " + e.getMessage());
            System.out.println("Reponse Status Code: " + e.getStatusCode());
            System.out.println("Error Code: " + e.getErrorCode());
            System.out.println("Request ID: " + e.getRequestId());

            // If we have an exception, ensure we don't break out of the loop.
            // This prevents the scenario where there was blip on the wire.
            return true;
        }

        return false;
    }
770853
public boolean ready() {
        for (VertxFileUpload file : files) {
            if (file.getErrorIfAny() != null) {
                return false;
            }
        }

        String contentType = request.headers().get(HeaderNames.CONTENT_TYPE);
        if (contentType != null) {
            contentType = HttpUtils.getContentTypeFromContentTypeAndCharacterSetting(contentType);
            if ((HttpUtils.isPostOrPut(request))
                    &&
                    (contentType.equalsIgnoreCase(MimeTypes.FORM) || contentType.equalsIgnoreCase(MimeTypes.MULTIPART))) {
                formData = new HashMap<>();
                for (String key : request.formAttributes().names()) {
                    formData.put(key, request.formAttributes().getAll(key));
                }
                return true;
            }
        }
        formData = new HashMap<>();
        return true;
    }
438717
protected static function databaseIsReady()
    {
        $object = DataObject::singleton(static::class);

        // if any of the tables aren't created in the database
        $table = $object->baseTable();
        if (!ClassInfo::hasTable($table)) {
            return false;
        }

        // if any of the tables don't have all fields mapped as table columns
        $dbFields = DB::field_list($table);
        if (!$dbFields) {
            return false;
        }

        $objFields = $object->getSchema()->databaseFields($object, false);
        $missingFields = array_diff_key($objFields, $dbFields);

        if ($missingFields) {
            return false;
        }

        return true;
    }
1321348
boolean isReady() {
        final C[] ds = destinations.get();
        if (ds == null)
            return false;
        for (final C 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, groupName);

        return ret;
    }
737720
public synchronized boolean hasService(Class serviceClass) {

        // todo: for multithreaded usage this block needs to be synchronized
        ServiceProvider sp = _serviceProviders.get(serviceClass);
        if (sp != null && !sp.isRevoked()) {
            return true;
        }

        // if service not found locally check in nested context
        BeanContext bc = getBeanContext();
        if (bc instanceof BeanContextServices) {
            return ((BeanContextServices) bc).hasService(serviceClass);
        }
        return false;
        // end synchronized
    }
338578
public static boolean isAvailable(Context context) {
        boolean connected = false;
        ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
        if (cm != null) {
            NetworkInfo ni = cm.getActiveNetworkInfo();
            if (ni != null) {
                connected = ni.isConnected();
            }
        }
        return connected;
    }
443215
def is_ready(self):
        """"""
        if not self.provisioning_state:
            raise exception.ServiceException("The object doesn't contain "
                                             "`provisioningState`.")
        elif self.provisioning_state == constant.FAILED:
            raise exception.ServiceException(
                "Failed to complete the required operation.")
        elif self.provisioning_state == constant.SUCCEEDED:
            LOG.debug("The model %s: %s was successfully updated "
                      "(or created).",
                      self.__class__.__name__, self.resource_id)
            return True

        return False