Checks if the load balancer addition is disabled or not.

@param asg
- The ASG object for which the status needs to be checked
@return - true, if the load balancer addition is suspended, false
otherwise.
181727
private boolean isAddToLoadBalancerSuspended(AutoScalingGroup asg) {
        List<SuspendedProcess> suspendedProcesses = asg.getSuspendedProcesses();
        for (SuspendedProcess process : suspendedProcesses) {
            if (PROP_ADD_TO_LOAD_BALANCER.equals(process.getProcessName())) {
                return true;
            }
        }
        return false;
    }
641633
private boolean stoppingAndNotAllowed(ComponentStatus status, InvocationContext ctx) throws Exception {
      return status.isStopping() && (!ctx.isInTxScope() || !isOngoingTransaction(ctx));
   }
621409
def exists(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    try:
        elb = conn.get_all_load_balancers(load_balancer_names=[name])
        if elb:
            return True
        else:
            log.debug('The load balancer does not exist in region %s', region)
            return False
    except boto.exception.BotoServerError as error:
        log.warning(error)
        return False
1292870
public boolean hasRoleGrant(Grant grant,String role){
        if (grant == null) throw new IllegalArgumentException("grant cannot be null");
        if (role == null) throw new IllegalArgumentException("role cannot be null");
        Set<String> roles = rolesGrants.get(grant);
        return roles!=null&&roles.contains(role);
    }
957950
public boolean isEnabled() {
        if (daysOfWeek != null && daysOfWeek.length > 0) {
            return true;
        }
        if (timesOfDay != null && timesOfDay.size() > 0) {
            return true;
        }
        return false;
    }
398495
public static boolean isEnabled(Config cfg) {
    return cfg.hasPath(ConfigurationKeys.METRICS_ENABLED_KEY) ? cfg.getBoolean(ConfigurationKeys.METRICS_ENABLED_KEY)
        : Boolean.parseBoolean(ConfigurationKeys.DEFAULT_METRICS_ENABLED);
  }
747333
protected boolean getBufferEnabled(Dsn dsn) {
        String bufferEnabled = Lookup.lookup(BUFFER_ENABLED_OPTION, dsn);
        if (bufferEnabled != null) {
            return Boolean.parseBoolean(bufferEnabled);
        }
        return BUFFER_ENABLED_DEFAULT;
    }
1248980
@Override
    public boolean isApprovalNeeded(final Rollout rollout) {
        final UserDetails userDetails = this.getActor(rollout);
        final boolean approvalEnabled = this.tenantConfigurationManagement
                .getConfigurationValue(TenantConfigurationKey.ROLLOUT_APPROVAL_ENABLED, Boolean.class).getValue();
        return approvalEnabled && userDetails.getAuthorities().stream()
                .noneMatch(authority -> SpPermission.APPROVE_ROLLOUT.equals(authority.getAuthority()));
    }
1206254
public boolean isAfter(final T element) {
        if (element == null) {
            return false;
        }

        return lowerEndpoint.includes(element) == false;
    }
1096064
@Override
    public boolean isPresent(int accessor) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.entry(this, tc, "isPresent", new Object[] { Integer.valueOf(accessor) });

        boolean result;
        checkIndex(accessor);

        synchronized (getMessageLockArtefact()) {
            if (cache[accessor] != null) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    JmfTr.exit(this, tc, "isPresent", Boolean.TRUE);
                return true;
            }

            // If it's not in the cache and the message isn't assembled it can't be present
            if (contents == null) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    JmfTr.exit(this, tc, "isPresent", Boolean.FALSE);
                return false;
            }

            // For an assembled message, the subclass's getFieldDef method should answer the question.
            result = getFieldDef(accessor, true) != null;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.exit(this, tc, "isPresent", Boolean.valueOf(result));
        return result;
    }
705734
private static boolean isSharedFileLockTable() {
        if (!propertyChecked) {
            synchronized (FileChannelImpl.class) {
                if (!propertyChecked) {
                    /*
                    String value = AccessController.doPrivileged(
                        new GetPropertyAction(
                            "sun.nio.ch.disableSystemWideOverlappingFileLockCheck"));
                    */
                    String value =
                        System.getProperty("sun.nio.ch.disableSystemWideOverlappingFileLockCheck");
                    isSharedFileLockTable = ((value == null) || value.equals("false"));
                    propertyChecked = true;
                }
            }
        }
        return isSharedFileLockTable;
    }
763693
@Override
    public boolean suspendConsumer(int suspendFlag)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "suspendConsumer", Integer.valueOf(suspendFlag));

        boolean didSuspendConsumer;
        //  We can't hold the LCP lock before we hold the keyGroup lock and we don't want to
        // take the asynch lock as we'll block on a consumerMessage call but the keyGroup
        // is set inside the LCP and asynch locks and could therefore vanish between checking for it
        // and trying to lock it here. So we take a dirty read of the keyGroup and if we
        // got it we'll lock it. This does mean there are slight windows around setting
        // and unsetting of the keyGroup but the worst case is that we lock the group when
        // we didn't need to (as we're no longer a member of the group).
        JSKeyGroup cachedKeyGroup = _keyGroup;

        // We're a member of a group so we must lock it before we go for the LCP lock
        // and take the message
        if (cachedKeyGroup != null)
            cachedKeyGroup.lock();

        try
        {
            this.lock();
            try
            {
                if (!isConsumerSuspended(suspendFlag)) // Is the consumer already suspended
                {
                    _consumerSuspended = true;
                    _suspendFlags |= suspendFlag;
                    unsetReady();
                    didSuspendConsumer = true;
                }
                else
                {
                    didSuspendConsumer = false;
                }
            } finally
            {
                this.unlock();
            }
        } finally
        {
            if (cachedKeyGroup != null)
                cachedKeyGroup.unlock();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "suspendConsumer", didSuspendConsumer);
        return didSuspendConsumer;
    }
655057
private boolean shouldMessageBeProcessed(DiscoveryIncomingMessage pMsg) {
        return pMsg != null &&
               restrictor.isRemoteAccessAllowed(pMsg.getSourceAddress().getHostAddress())
               && pMsg.isQuery();
    }
888039
private boolean checkEnabled() {
        /* Enable this analyzer ONLY if the Nexus URL has been set to something
         other than the default one (if it's the default one, we'll use the
         central one) and it's enabled by the user.
         */
        boolean retval = false;
        try {
            if (!DEFAULT_URL.equals(getSettings().getString(Settings.KEYS.ANALYZER_NEXUS_URL))
                    && getSettings().getBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED)) {
                LOGGER.info("Enabling Nexus analyzer");
                retval = true;
            } else {
                LOGGER.debug("Nexus analyzer disabled, using Central instead");
            }
        } catch (InvalidSettingException ise) {
            LOGGER.warn("Invalid setting. Disabling Nexus analyzer");
        }

        return retval;
    }
1051755
def cli(env, identifier):
    """"""

    mgr = SoftLayer.LoadBalancerManager(env.client)

    _, loadbal_id = loadbal.parse_id(identifier)

    if not (env.skip_confirmations or
            formatting.confirm("This action will cancel a load balancer. "
                               "Continue?")):
        raise exceptions.CLIAbort('Aborted.')

    mgr.cancel_lb(loadbal_id)
    env.fout('Load Balancer with id %s is being cancelled!' % identifier)
351083
public boolean checkAccess(AccessFlags flags){

        boolean isPublic = flags.is(AccessFlags.ACC_PUBLIC);
        boolean isProtected = flags.is(AccessFlags.ACC_PROTECTED);
        boolean isPrivate = flags.is(AccessFlags.ACC_PRIVATE);
        boolean isPackage = !(isPublic || isProtected || isPrivate);

        if ((showAccess == AccessFlags.ACC_PUBLIC) && (isProtected || isPrivate || isPackage))
            return false;
        else if ((showAccess == AccessFlags.ACC_PROTECTED) && (isPrivate || isPackage))
            return false;
        else if ((showAccess == 0) && (isPrivate))
            return false;
        else
            return true;
    }
950631
private boolean checkImplementer(TypeElement providerImplementer, TypeElement providerType) {

    String verify = processingEnv.getOptions().get("verify");
    if (verify == null || !Boolean.valueOf(verify)) {
      return true;
    }

    // TODO: We're currently only enforcing the subtype relationship
    // constraint. It would be nice to enforce them all.

    Types types = processingEnv.getTypeUtils();

    return types.isSubtype(providerImplementer.asType(), providerType.asType());
  }