Call this method to check the state of "Loop Once".

@return boolean - the state.
480780
protected synchronized boolean isLoopOnce() {
        final String methodName = "isLoopOnce()";
        if (loopOnce) {
            traceDebug(methodName, "cacheName=" + this.cod.cacheName + " isLoopOnce=" + loopOnce + " explicitBuffer=" + explicitBuffer.size()
                    + " scanBuffer=" + this.scanBuffer.size());
        }
        return this.loopOnce;
    }
464867
public function isSuccessful()
    {
        if ($this->getState() === static::STATE_NOT_RUNNING) {
            foreach ($this->items as $run) {
                if (!$run->isSuccessful()) {
                    return false;
                }
            }
            return true;
        }
        return false;
    }
1042717
public function check()
    {
        return $this->horizonIsRunning()
            ? $this->makeHealthyResult()
            : $this->makeResult(false, $this->target->getErrorMessage());
    }
830100
public function valid()
     {
        if ($this->_iterationMax === null) {
          $this->_iterationMax = $this->countMessages();
        }
        return $this->_iterationPos && $this->_iterationPos <= $this->_iterationMax;
     }
1200719
protected function hasInvalidState()
    {
        if ($this->isStateless()) {
            return false;
        }

        $state = $this->request->getSession()->pull('state');

        return !(strlen($state) > 0 && $this->request->input('state') === $state);
    }
1287633
public function check()
    {
        $current = $this->getCurrentUptime();

        $inTrouble =
            $current['load_1'] > $this->target->maxLoad['load_1'] ||
            $current['load_5'] > $this->target->maxLoad['load_5'] ||
            $current['load_15'] > $this->target->maxLoad['load_15'];

        return $this->makeResult(! $inTrouble, $this->makeMessage($current));
    }
1196073
public function pause()
    {
        if ($this->state !== self::STATE_STARTED) {
            return false;
        }

        $time = microtime(true);

        $this->runtime += ($time - $this->startTime);
        $this->startTime = null;
        $this->setState(self::STATE_PAUSED);

        return true;
    }
868454
protected function one() {
        $query = $this->loadElements();
        $this->source->setQuery($query);
        $result = $this->source->one();
        $activeTransformations = $this->activeTransformations;
        $this->reset();
        if($result && !empty($activeTransformations)) {
            foreach ($activeTransformations as $transform) {
                if(isset($this->transforms[$transform])) {
                    $result = call_user_func($this->transforms[$transform], $result);
                }
                if(isset($this->arraytransforms[$transform])) {
                    $temp = call_user_func($this->arraytransforms[$transform], [$result]);
                    $result = $temp[0];
                }
            }
        }
        $this->reset();
        return $result;
    }
169846
protected function loopOnce()
    {
        // Get all the Sockets we should be reading from
        $read = array_merge([$this->masterSocket], $this->clients);

        // Set up a block call to socket_select
        $write = null;
        $except = null;
        $ret = Socket::select($read, $write, $except, $this->timeout);
        if (!is_null($this->timeout) && $ret == 0) {
            if ($this->triggerHooks(self::HOOK_TIMEOUT, $this->masterSocket) === false) {
                // This only happens when a hook tells the server to shut itself down.
                return false;
            }
        }

        // If there is a new connection, add it
        if (in_array($this->masterSocket, $read)) {
            unset($read[array_search($this->masterSocket, $read)]);
            $socket = $this->masterSocket->accept();
            $this->clients[] = $socket;

            if ($this->triggerHooks(self::HOOK_CONNECT, $socket) === false) {
                // This only happens when a hook tells the server to shut itself down.
                return false;
            }
            unset($socket);
        }

        // Check for input from each client
        foreach ($read as $client) {
            $input = $this->read($client);

            if ($input === '') {
                if ($this->disconnect($client) === false) {
                    // This only happens when a hook tells the server to shut itself down.
                    return false;
                }
            } else {
                if ($this->triggerHooks(self::HOOK_INPUT, $client, $input) === false) {
                    // This only happens when a hook tells the server to shut itself down.
                    return false;
                }
            }
            unset($input);
        }

        // Unset the variables we were holding on to
        unset($read);
        unset($write);
        unset($except);

        // Tells self::run to Continue the Loop
        return true;
    }
706062
public function hasLoop(): bool {
        $tortoise = $this->getHead();
        $hare = $this->getHead();

        while ($tortoise !== null && $hare->getNext() !== null) {
            $hare = $hare->getNext()->getNext();

            if (Comparator::equals($tortoise->getValue(), $hare->getValue())) {
                return true;
            }

            $tortoise = $tortoise->getNext();
        }
        return false;
    }
1000963
public function isAlive()
    {
        if ($this->pid < 1) {
            return false;
        }

        $status = null;
        $pid = pcntl_wait($status, WNOHANG);

        switch ($pid) {
            case -1:
                throw new \RuntimeException('pcntl_wait failed.');

            case $this->pid:
                $this->pid = -1;

                return false;

            case 0:
                return true;
        }

        // Other pid exited.
        return true;
    }
999058
public function valid()
    {
        // initialize/refresh cursor
        if ($this->cursor != 0 && !isset($this->elements[$this->index])) {
            $this->scan();
        }

        return isset($this->elements[$this->index]);
    }
868491
protected function _loop()
    {
        $tracker = $this->_getTracker();
        $this->_advanceTracker($tracker);
        $iteration = $this->_createIterationFromTracker($tracker);

        return $iteration;
    }
333358
public function hasNextState()
	{
		return $this->cacheIndexMap[$this->owner->{$this->stateAttribute}] + 1 < count($this->stateConfig);
	}
227917
protected function __lock()
    {
        $beginTime = microtime(true);
        do {
            if($this->__tryLock())
            {
                return true;
            }
            if(0 === $this->waitTimeout || microtime(true) - $beginTime < $this->waitTimeout / 1000)
            {
                if(Coroutine::isIn())
                {
                    Coroutine::sleep($this->waitSleepTime / 1000);
                }
                else
                {
                    usleep($this->waitSleepTime * 1000);
                }
            }
            else
            {
                break;
            }
        } while(true);
        return false;
    }
287925
public function check()
    {
        $currentValue = (int) ini_get($this->setting);
        
        $return = false;
        foreach($this->requiredValues as $key => $requiredValue){
            $this->requiredValues[$key]['isValid'] = version_compare($currentValue, $requiredValue['requiredValue'], $requiredValue['operator']);
            
            if($this->requiredValues[$key]['isValid']){
                $return = true;
            }
        }
        
        return $return;
    }
270080
protected function hasInvalidState()
    {
        if ($this->isStateless()) {
            return false;
        }

        $state = $this->request->getSession()->get('state');

        return !(strlen($state) > 0 && $this->request->get('state') === $state);
    }