Returns whether the ME is running as part of a stand alone server.

@return
178392
final public boolean isSingleServer() {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "isSingleServer");
        if (!_singleServerSet) {
            JsAdminService service = JsMainAdminComponentImpl.getJsAdminService();
            if (service.isInitialized())
                _isSingleServer = service.isStandaloneServer();
            else
                // If admin service isn't initialised, then assume we are single
                // service.
                _isSingleServer = true;

            _singleServerSet = true;
        }

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "isSingleServer", new Boolean(_isSingleServer));
        return _isSingleServer;
    }
984572
public boolean isRunning() {
        try {
            client.get("/");
            return true;
        } catch (IOException e) {
            LOGGER.debug("isRunning()", e);
            return false;
        }
    }
1018033
public boolean isViConnected() {
        if(mRemoteService != null) {
            try {
                return mUserOriginPipeline.isActive() || mRemoteService.isViConnected();
            } catch(RemoteException e) {
                Log.d(TAG, "Unable to send message to remote service", e);
            }
        }
        return false;
    }
1020379
private boolean checkVmIsKnown() {

		DescribeInstancesRequest dis = new DescribeInstancesRequest();
		dis.setInstanceIds(Collections.singletonList(this.machineId));

		DescribeInstancesResult disresult = this.ec2Api.describeInstances(dis);
		return disresult.getReservations().size() > 0
				&& disresult.getReservations().get( 0 ).getInstances().size() > 0;
	}
880728
@Exported
    public boolean isIdle() {
        lock.readLock().lock();
        try {
            return workUnit == null && executable == null;
        } finally {
            lock.readLock().unlock();
        }
    }
243840
public static boolean runHeadless() {
        String headless = getProgramProperty(HEADLESS);
        if (headless == null) {
            return false;
        }
        if ("".equals(headless)) {
            return true;
        }
        return "true".equalsIgnoreCase(headless);
    }
404581
boolean callbackUnregistered(final TransactionalProtocolClient old, final boolean shuttingDown) {
        // Disconnect the remote connection.
        // WFCORE-196 Do this out of the sync block to avoid deadlocks where in-flight requests can't
        // be informed that the channel has closed
        protocolClient.disconnected(old);

        synchronized (this) {
            // If the connection dropped without us stopping the process ask for reconnection
            if (!shuttingDown && requiredState == InternalState.SERVER_STARTED) {
                final InternalState state = internalState;
                if (state == InternalState.PROCESS_STOPPED
                        || state == InternalState.PROCESS_STOPPING
                        || state == InternalState.STOPPED) {
                    // In case it stopped we don't reconnect
                    return true;
                }
                // In case we are reloading, it will reconnect automatically
                if (state == InternalState.RELOADING) {
                    return true;
                }
                try {
                    ROOT_LOGGER.logf(DEBUG_LEVEL, "trying to reconnect to %s current-state (%s) required-state (%s)", serverName, state, requiredState);
                    internalSetState(new ReconnectTask(), state, InternalState.SEND_STDIN);
                } catch (Exception e) {
                    ROOT_LOGGER.logf(DEBUG_LEVEL, e, "failed to send reconnect task");
                }
                return false;
            } else {
                return true;
            }
        }
    }
1088554
@Override
  public boolean isServerCopy(ServerBartender server)
  {
    for (int i = 0; i < _owners.length; i++) {
      ServerBartender serverBar = server(i);

      if (serverBar != null && serverBar.isSameServer(server)) {
        return true;
      }
    }

    return false;
  }
1289021
private boolean isAuthorized() {
        SecurityService securityService = securityServiceRef.getService();
        AuthorizationService authzService = securityService.getAuthorizationService();
        boolean isAuthorized = authzService.isAuthorized(ManagementSecurityConstants.ADMIN_RESOURCE_NAME,
                                                         requiredRoles, null);
        return isAuthorized;
    }
27754
public function exclusivelySingle()
    {
        if (count($this) === 0) {
            return false;
        }

        foreach (array_keys($this->getDataPlaceHolder()) as $key) {
            $v = $this[$key];
            if (is_null($v) || $v instanceof Container) {
                return false;
            }
        }

        return true;
    }
910089
private boolean checkFailover() throws InterruptedException {
    boolean isPrimary = isPrimaryServiceCached();
    if (!isPrimary && isPrimaryService()) {
      this.servicePair.setPrimaryOfferService(this);
      return true;
    }
    return false;
  }
133678
def _is_master_running(self):
        '''
        
        '''
        # Windows doesn't have IPC. Assume the master is running.
        # At worse, it will error 500.
        if salt.utils.platform.is_windows():
            return True

        if self.opts['transport'] == 'tcp':
            ipc_file = 'publish_pull.ipc'
        else:
            ipc_file = 'workers.ipc'
        return os.path.exists(os.path.join(
            self.opts['sock_dir'],
            ipc_file))
951794
public synchronized static boolean hasSudo()
	{
		if (!sudoTested)
		{
			String[] cmdArr = new String[]{"which", "sudo"};
			List<String> cmd = new ArrayList<String>(cmdArr.length);
			Collections.addAll(cmd, cmdArr);

			ProcessBuilder whichsudo = new ProcessBuilder(cmd);

			try
			{
				Process p = whichsudo.start();
				try
				{
					Execed e = new Execed(cmd, p, false);

					// Let it run
					int returnCode = e.waitForExit(new Deadline(3, TimeUnit.SECONDS));

					sudoSupported = (returnCode == 0);
					sudoTested = true;
				}
				finally
				{
					p.destroy();
				}
			}
			catch (Throwable t)
			{
				sudoSupported = false;
				sudoTested = true;
			}
		}

		return sudoSupported;
	}
664731
@Override
    public void messagingEngineReloaded(JsMessagingEngine engine)
    {
        final String methodName = "messagingEngineReloaded";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName, engine);
        }

        // We are now catching problems when ME's are not started and not throwing an error.
        // As such this check is not needed and is causing problems. The problem is that
        // we could have a cluster of MEs with only one ME running. If a queue is deleted
        // then recreated only the MDB that is sitting alongside the ME will reconnect, 
        // the other MEs will wait for the local ME to start to try to reconnect but this
        // may never happen so we need to try to reconnect at this point.
        try
        {
            clearTimer();
            timerLoop();
        } catch (final ResourceException exception)
        {
            // No FFDC code needed
            if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled())
            {
                SibTr.exception(this, TRACE, exception);
            }

            SibTr.error(TRACE, "RELOAD_FAILED_CWSIV0773", new Object[] {
                                                                        exception, engine.getName(), engine.getBusName(), this });
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(this, TRACE, methodName);
        }
    }
406891
public boolean isBusy() {
        lock.readLock().lock();
        try {
            return workUnit != null || executable != null;
        } finally {
            lock.readLock().unlock();
        }
    }
225674
public boolean isEnabled()
    {
        if ((this.getMasterSlaveFlag() & FileListener.RUN_IN_SLAVE) == 0) // Is NOT enabled in a SERVER only environment
            if (this.getOwner() != null)
                if ((this.getOwner().getMasterSlave() & RecordOwner.MASTER) == 0) // Is not a client environment
            return false;   // Don't run this listener in a server-only environment
        if ((this.getMasterSlaveFlag() & FileListener.RUN_IN_MASTER) == 0) // Is NOT enabled in a CLIENT only environment
            if (this.getOwner() != null)
                if ((this.getOwner().getMasterSlave() & RecordOwner.SLAVE) == 0) // Is not a server environment
            return false;   // Don't run this listener in a client-only environment
        return super.isEnabled();
    }
1368801
public boolean stopStandby() {
    for (int k = 0; k < mNumOfMasters; k++) {
      if (!mMasters.get(k).isServing()) {
        try {
          LOG.info("master {} is a standby. stopping it...", k);
          mMasters.get(k).stop();
          LOG.info("master {} stopped.", k);
        } catch (Exception e) {
          LOG.error(e.getMessage(), e);
          return false;
        }
        return true;
      }
    }
    return false;
  }