/* (non-Javadoc)
@see com.centurylink.mdw.container.plugins.TestInterface#currentStatus()
516768
public String currentStatus() {
        StringBuffer sb = new StringBuffer();
        sb.append("===== CommonThreadPool Status at ").append(new Date()).append(" =====\n");
        sb.append("Threads: current=").append(thread_pool.getPoolSize());
        sb.append(", core=").append(thread_pool.getCorePoolSize());
        sb.append(", max=").append(thread_pool.getMaximumPoolSize());
        sb.append(", active=").append(thread_pool.getActiveCount()).append("\n");
        BlockingQueue<Runnable> workQueue = thread_pool.getQueue();
        sb.append("Queue: current=").append(workQueue.size()).append("\n");
        sb.append("Works: total=").append(thread_pool.getTaskCount());
        sb.append(", completed=").append(thread_pool.getCompletedTaskCount()).append("\n");
        for (String name : workers.keySet()) {
            Worker worker = workers.get(name);
            sb.append(" - Worker ").append(name);
            sb.append(": current works=").append(worker.curWorks);
            sb.append(", current thread=").append(worker.curThreads);
            sb.append(", total submit=").append(worker.totalSubmits);
            sb.append(", total reject=").append(worker.totalRejects).append("\n");
        }
        Worker worker = defaultWorker;
        sb.append(" - Default Worker: ");
        sb.append(": current works=").append(worker.curWorks);
        sb.append(", current thread=").append(worker.curThreads);
        sb.append(", total submit=").append(worker.totalSubmits);
        sb.append(", total reject=").append(worker.totalRejects).append("\n");
        return sb.toString();
    }
1104931
public function doStatus()
	{
		assert($this->_dispatcher);
		assert($this->_container);

		$this->_clearStatProperties();
		$this->_dispatcher->dispatch(self::EVENT_INIT_SERVICE, OnInitService::create());

		try
		{
			$this->notify(self::STATE_FIRED);

			$modulesAndFiles = $this->_findModulesAndMigrationFiles();
			$migrations      = $this->_parseMigrationFiles($modulesAndFiles);

			$this->notify(self::STATE_FIND_MIGRATIONS);

			$actions         = $this->_askMigrationList($modulesAndFiles, $migrations);
			$actions         = $this->_sortMigrationsList($actions);

			$this->notify(self::STATE_MIGRATIONS_ASKED);
			$states = [self::STATE_MIGRATION_STORED, self::STATE_MIGRATION_ROLLBACK, self::STATE_MIGRATION_APPLY];

			foreach (array_combine($states, [$actions[2], $actions[0], $actions[1]]) as $state => $migrations)
			{
				foreach (array_keys($migrations) as $migrationName)
				{
					$this->_stateMigrationName = $migrationName;
					$this->notify($state);
				}
			}

			$this->notify(self::STATE_COMPLETE);
		}
		catch (Exception $exception)
		{
			$this->_printError($exception);
			$this->notify(self::STATE_COMPLETE);
		}
		finally
		{
			$this->_stateMigrationName = null;
			$this->_state = self::STATE_INITIALIZED;

			$this->_dispatcher->dispatch(self::EVENT_FREE_SERVICE, OnFreeService::create());
		}
	}
304483
@Override
	protected synchronized void checkDataMaps() throws IOException {
		if (lastUpdateCheck == 0 || lastUpdateCheck < System.currentTimeMillis() - updateInterval) {
			String versionOnServer = getVersionFromServer();
			if (currentVersion == null || versionOnServer.compareTo(currentVersion) > 0) {
				loadDataFromInternet();
				currentVersion = versionOnServer;
			}
			lastUpdateCheck = System.currentTimeMillis();
		}
	}
771565
protected void updateStatus() {
        if (!plugins.isEmpty()) {
            boolean disabled = isDisabled();
            
            for (ElementPlugin container : plugins) {
                container.setDisabled(disabled);
            }
        }
    }
827325
public static void ensureCurrentState(Service.STATE state,
                                        Service.STATE expectedState) {
    if (state != expectedState) {
      throw new IllegalStateException("For this operation, the " +
                                          "current service state must be "
                                          + expectedState
                                          + " instead of " + state);
    }
  }
573981
public boolean
isCurrent() {
	BasicHandler handler = getBasicHandler();
	return (handler.axfr == null && handler.ixfr == null);
}
572985
public static void setCurrent(SiteContext current) {
        threadLocal.set(current);

        MDC.put(SITE_NAME_MDC_KEY, current.getSiteName());
    }
1102207
public Object current() {
        Entry entry = flushedEntry;
        if (entry == null) {
            return null;
        }

        return entry.msg;
    }
1349254
protected void updateStatusBar() {
		if (statusBar != null) {
			int all = getBaseEventList().size();
			int showing = getFinalEventList().size();
			String msg;
			if (all == showing) {
				String[] keys = new String[] {
						modelId + "." + SHOWINGALL_MSG_KEY, SHOWINGALL_MSG_KEY };
				msg = getApplicationConfig().messageResolver().getMessage(
						keys,
						new Object[] {
								"" + all,
								(all != 1) ? objectPluralName
										: objectSingularName });
			} else {
				String[] keys = new String[] {
						modelId + "." + SHOWINGN_MSG_KEY, SHOWINGN_MSG_KEY };

				msg = getApplicationConfig().messageResolver().getMessage(
						keys,
						new Object[] {
								"" + showing,
								(showing != 1) ? objectPluralName
										: objectSingularName, "" + all });
			}
			// Now add the selection info
			int nselected = getTable().getSelectedRowCount();
			if (nselected > 0) {
				String[] keys = new String[] {
						modelId + "." + SELECTEDN_MSG_KEY, SELECTEDN_MSG_KEY };

				msg += getApplicationConfig().messageResolver().getMessage(keys,
						new Object[] { "" + nselected });
			}
			statusBar.setMessage(msg.toString());
		}
	}
89390
private Context current(boolean fail) {
        Context context = Context.CONTEXT.get();
        if (context == null && fail) {
            throw new IllegalStateException("No context");
        }
        return context;
    }
941762
public int getStatus()
    {
        Integer intStatus = (Integer)this.getFieldData(m_strStatusField);
        if (intStatus != null)
            return intStatus.intValue();
        return 0;
    }
1302439
public void setLinkStatus(com.google.api.ads.adwords.axis.v201809.mcm.ServiceLinkLinkStatus linkStatus) {
        this.linkStatus = linkStatus;
    }
43453
protected void setPageStatus(IStatus status) {
		this.status = status == null ? SARLEclipsePlugin.getDefault().createOkStatus() : status;
	}
395195
public int getStatus() {
        if (ptm == null) {
            return TransactionManager.STATUS_NO_TRANSACTION;
        }

        // logger.debug( "Current TX name (According to TransactionSynchronizationManager) : " + TransactionSynchronizationManager.getCurrentTransactionName() );
        if (TransactionSynchronizationManager.isActualTransactionActive()) {
            TransactionStatus transaction = null;
            boolean commitNewTransaction = false;
            try {
                if (currentTransaction.isEmpty()) {
                    transaction = ptm.getTransaction(td);
                    currentTransaction.push(transaction);
                    commitNewTransaction = true;
                    if (transaction.isNewTransaction()) {
                        return TransactionManager.STATUS_COMMITTED;
                    }
                } else {
                    transaction = currentTransaction.peek();
                }
                logger.debug("Current TX: " + transaction);
                // If SynchronizationManager thinks it has an active transaction but
                // our transaction is a new one
                // then we must be in the middle of committing
                if (transaction.isCompleted()) {
                    if (transaction.isRollbackOnly()) {
                        return TransactionManager.STATUS_ROLLEDBACK;
                    }
                    return TransactionManager.STATUS_COMMITTED;
                } else {
                    if (transaction.isRollbackOnly()) {
                        return 5;
                    }
                    return TransactionManager.STATUS_ACTIVE;
                }
            } finally {
                if (commitNewTransaction) {
                    ptm.commit(transaction);
                }
            }
        }
        return TransactionManager.STATUS_NO_TRANSACTION;
    }
565819
public synchronized Entry current()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "current");

    checkEntryParent();
      
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "current", current);

    return current;
  }
1360841
PollingState<T> withStatus(String status, int statusCode) throws IllegalArgumentException {
        if (status == null) {
            throw new IllegalArgumentException("Status is null.");
        }
        this.status = status;
        this.statusCode = statusCode;
        return this;
    }
813629
public com.google.api.ads.admanager.axis.v201811.ComputedStatus getStatus() {
        return status;
    }