Returns true is full AD sync required and false otherwise

@param bool          $forceFullSync
@param PollTask|null $lastSuccessfulSyncTask
@param string        $currentRootDseDnsHostName
@param string        $currentInvocationId

@return bool
542736
private function isFullSyncRequired($forceFullSync, PollTask $lastSuccessfulSyncTask = null, $currentRootDseDnsHostName, $currentInvocationId)
    {
        if ($forceFullSync) {
            return true;
        }

        if (!$lastSuccessfulSyncTask) {
            return true;
        }

        if ($lastSuccessfulSyncTask->getRootDseDnsHostName() != $currentRootDseDnsHostName) {
            return true;
        }

        if ($lastSuccessfulSyncTask->getInvocationId() != $currentInvocationId) {
            return true;
        }

        return false;
    }
987236
@Service
    public Task poll(String taskType, String workerId, String domain) {
        LOGGER.debug("Task being polled: /tasks/poll/{}?{}&{}", taskType, workerId, domain);
        Task task = executionService.getLastPollTask(taskType, workerId, domain);
        if (task != null) {
            LOGGER.debug("The Task {} being returned for /tasks/poll/{}?{}&{}", task, taskType, workerId, domain);
        }
        Monitors.recordTaskPollCount(taskType, domain, 1);
        return task;
    }
1278633
private boolean aggregateExistsForCurrentMinute(final MetricIdentity identity) {
		Preconditions.checkNotNull(identity);
		
		if (aggregates.containsKey(identity)) {			
			if (aggregates.get(identity).containsKey(currentMinute)) {
				return true;
			}
		}
		
		return false;
	}
391625
@Override
    EntityManager getEMInvocationInfo(boolean requireTx, LockModeType mode)
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();

        if (isTraceOn && tc.isEntryEnabled())
        {
            Tr.entry(tc, "getEMInvocationInfo : " + requireTx + " : " + ((mode == null) ? "null" : mode));
        }

        if (requireTx || (mode != null && !LockModeType.NONE.equals(mode)))
        {
            throw new UnsupportedOperationException("This entity manager cannot perform operations that require a transactional context");
        }

        if (!ivEnlisted)
        {
            UOWCoordinator uowCoord = ivAbstractJPAComponent.getUOWCurrent().getUOWCoord();
            // Enlist in either the global tran or LTC
            if (uowCoord.isGlobal())
            {
                // Register invocation object to transaction manager for clean up
                registerEmInvocation(uowCoord, this); //d638095.2
            }
            else
            {
                // Register invocation object to LTC for clean up
                LocalTransactionCoordinator ltCoord = (LocalTransactionCoordinator) uowCoord;
                ltCoord.enlistSynchronization(this);
            }
            // Mark this em as enlisted for clean up
            ivEnlisted = true;
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "getEMInvocationInfo : " + ivEm);
        return ivEm;
    }
1038571
public function isInputSync($inputSync = null)
    {
        if ($inputSync !== null) {
            $this->inputSync = (bool) $inputSync;
        }

        return $this->inputSync;
    }
1068119
boolean doWork(long txnId, TransactionTask task)
    {
        boolean retval = canAcceptWork();
        if (!retval) {
            return false;
        }
        MpRoSiteContext site;
        // Repair case
        if (m_busySites.containsKey(txnId)) {
            site = m_busySites.get(txnId);
        }
        else {
            if (m_idleSites.isEmpty()) {
                MpRoSiteContext newSite = new MpRoSiteContext(m_siteId,
                        m_backend,
                        m_catalogContext,
                        m_partitionId,
                        m_initiatorMailbox,
                        m_poolThreadFactory);
                m_idleSites.push(newSite);
                m_allSites.add(newSite);
            }
            site = m_idleSites.pop();
            m_busySites.put(txnId, site);
        }
        site.offer(task);
        return true;
    }
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;
            }
        }
    }
442305
private static boolean meetsThresholdRequirement(long timeTaken) {
        final P6LogLoadableOptions opts = P6LogOptions.getActiveInstance();
        long executionThreshold = null != opts ? opts.getExecutionThreshold() : 0;
    
    return executionThreshold <= 0 || TimeUnit.NANOSECONDS.toMillis(timeTaken) > executionThreshold;
  }
294334
public Invocation getLastInvocation() {
        OngoingStubbingImpl ongoingStubbing = ((OngoingStubbingImpl) mockingProgress().pullOngoingStubbing());
        List<Invocation> allInvocations = ongoingStubbing.getRegisteredInvocations();
        return allInvocations.get(allInvocations.size() - 1);
    }
596887
boolean takeTaskPermit()
    {
        while (true)
        {
            long current = permits.get();
            int taskPermits = taskPermits(current);
            if (taskPermits == 0)
                return false;
            if (permits.compareAndSet(current, updateTaskPermits(current, taskPermits - 1)))
            {
                if (taskPermits == maxTasksQueued && hasRoom.hasWaiters())
                    hasRoom.signalAll();
                return true;
            }
        }
    }
1073431
def invoke_with_call_chain(task_args, invocation_chain) # :nodoc:
      new_chain = InvocationChain.append(self, invocation_chain)
      @lock.synchronize do
        if application.options.trace
          puts "** Invoke #{name} #{format_trace_flags}"
        end
        return if @already_invoked
        @already_invoked = true
        invoke_prerequisites(task_args, new_chain)
        execute(task_args) if needed?
      end
    end
1229690
@Deprecated
    public C verifyAtMost(int allowedStatements, Threads threadMatcher) throws WrongNumberOfQueriesError {
        return verify(SqlQueries.maxQueries(allowedStatements).threads(threadMatcher));
    }
431568
private void checkForAbandonedTask(Tenant tenant, TaskRecord taskRecord, long minsSinceLastActivity) {
        if (minsSinceLastActivity > DEAD_TASK_THRESHOLD_MINS) {
            String taskIdentity = createMapKey(tenant, taskRecord.getTaskID());
            String reason = "No progress reported in " + minsSinceLastActivity + " minutes";
            m_logger.error("Remote task {} has not reported progress in {} minutes; marking as failed",
                           taskIdentity, minsSinceLastActivity);
            taskRecord.setProperty(TaskRecord.PROP_FINISH_TIME, Long.toString(System.currentTimeMillis()));
            taskRecord.setProperty(TaskRecord.PROP_FAIL_REASON, reason);
            taskRecord.setStatus(TaskStatus.FAILED);
            updateTaskStatus(tenant, taskRecord, true);
        }
    }
1368558
public function requestSms($authyId, $force = false) {
    $data = array(
      'authy_id' => $authyId,
      'force'    => $force,
    );

    $result = $this->apiCall('sms', $data);

    if ($result === false) {
      $this->lastError = 'AUTHY_SERVER_ERROR';
      return false;
    }

    if (isset($result->errors)) {
      $this->lastError = 'AUTHY_SERVER_INVALID_DATA';
      return false;
    }

    return true;
  }
898103
private void runForBlockingDataTransfer(SiteProcedureConnection siteConnection)
    {
        boolean sourcesReady = false;
        RestoreWork restoreWork = m_dataSink.poll(m_snapshotBufferAllocator);
        if (restoreWork != null) {
            restoreBlock(restoreWork, siteConnection);
            sourcesReady = true;
        }

        // The completion monitor may fire even if m_dataSink has not reached EOF in the case that there's no
        // replicated table in the database, so check for both conditions.
        if (m_dataSink.isEOF() || m_snapshotCompletionMonitor.isDone()) {
            // No more data from this data sink, close and remove it from the list
            m_dataSink.close();

            if (m_streamSnapshotMb != null) {
                VoltDB.instance().getHostMessenger().removeMailbox(m_streamSnapshotMb.getHSId());
                m_streamSnapshotMb = null;
                ELASTICLOG.debug(m_whoami + " data transfer is finished");
            }

            if (m_snapshotCompletionMonitor.isDone()) {
                try {
                    SnapshotCompletionEvent event = m_snapshotCompletionMonitor.get();
                    siteConnection.setDRProtocolVersion(event.drVersion);
                    assert(event != null);
                    ELASTICLOG.debug("P" + m_partitionId + " noticed data transfer completion");
                    m_completionAction.setSnapshotTxnId(event.multipartTxnId);

                    setJoinComplete(siteConnection,
                                    event.exportSequenceNumbers,
                                    event.drSequenceNumbers,
                                    event.drMixedClusterSizeConsumerState,
                                    false /* requireExistingSequenceNumbers */,
                                    event.clusterCreateTime);
                } catch (InterruptedException e) {
                    // isDone() already returned true, this shouldn't happen
                    VoltDB.crashLocalVoltDB("Impossible interruption happend", true, e);
                } catch (ExecutionException e) {
                    VoltDB.crashLocalVoltDB("Error waiting for snapshot to finish", true, e);
                }
            } else {
                m_taskQueue.offer(this);
            }
        } else {
            // The sources are not set up yet, don't block the site,
            // return here and retry later.
            returnToTaskQueue(sourcesReady);
        }
    }
866262
protected void activeStatusChanged(boolean newActiveState) throws PushStateException {
      active = newActiveState;
      log.debugf("changed mode %s", this);
      if (active && singletonConfiguration.pushStateWhenCoordinator())
         doPushState();
   }
372787
private void setLastApplied(long lastApplied) {
    // lastApplied should be either equal to or one greater than this.lastApplied.
    if (lastApplied > this.lastApplied) {
      Assert.arg(lastApplied == this.lastApplied + 1, "lastApplied must be sequential");

      this.lastApplied = lastApplied;

      // Update the index for each session. This will be used to trigger queries that are awaiting the
      // application of specific indexes to the state machine. Setting the session index may cause query
      // callbacks to be called and queries to be evaluated.
      for (ServerSessionContext session : executor.context().sessions().sessions.values()) {
        session.setLastApplied(lastApplied);
      }

      // Take a state machine snapshot if necessary.
      takeSnapshot();

      // Install a state machine snapshot if necessary.
      installSnapshot();
    } else {
      Assert.arg(lastApplied == this.lastApplied, "lastApplied cannot be decreased");
    }
  }