當前位置: 首頁>>代碼示例>>Java>>正文


Java ShutdownRequestType類代碼示例

本文整理匯總了Java中org.hawk.core.IModelIndexer.ShutdownRequestType的典型用法代碼示例。如果您正苦於以下問題:Java ShutdownRequestType類的具體用法?Java ShutdownRequestType怎麽用?Java ShutdownRequestType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ShutdownRequestType類屬於org.hawk.core.IModelIndexer包,在下文中一共展示了ShutdownRequestType類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: stop

import org.hawk.core.IModelIndexer.ShutdownRequestType; //導入依賴的package包/類
@Override
public void stop(BundleContext bundleContext) throws Exception {
	Activator.context = null;
	HManager.getInstance().stopAllRunningInstances(
			ShutdownRequestType.ONLY_LOCAL);

	if (artemis != null) {
		artemis.stop();
		artemis = null;
	}

	if (tcpServer != null) {
		tcpServer.stop();
		tcpServer = null;
	}
}
 
開發者ID:mondo-project,項目名稱:mondo-integration,代碼行數:17,代碼來源:Activator.java

示例2: stop

import org.hawk.core.IModelIndexer.ShutdownRequestType; //導入依賴的package包/類
@Override
public void stop(BundleContext bundleContext) throws Exception {

	Activator.context = null;
	
	HManager.getInstance().stopAllRunningInstances(
			ShutdownRequestType.ONLY_LOCAL);
	
	
	if (artemis != null) {
		artemis.stop();
		artemis = null;
	}

	if (tcpServer != null) {
		tcpServer.stop();
		tcpServer = null;
	}
}
 
開發者ID:mondo-project,項目名稱:mondo-hawk,代碼行數:20,代碼來源:Activator.java

示例3: delete

import org.hawk.core.IModelIndexer.ShutdownRequestType; //導入依賴的package包/類
public void delete() throws BackingStoreException {
	removeHawkFromMetadata(getHawkConfig());

	File f = hawk.getModelIndexer().getParentFolder();
	if (this.isRunning()) {
		try {
			hawk.getModelIndexer().shutdown(ShutdownRequestType.ONLY_LOCAL);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	if (f.exists()) {
		getConsole().println("Hawk instance removed from ui but persistence remains at: " + f);
	}
}
 
開發者ID:mondo-project,項目名稱:mondo-hawk,代碼行數:17,代碼來源:HModel.java

示例4: stopInstance

import org.hawk.core.IModelIndexer.ShutdownRequestType; //導入依賴的package包/類
@Override
public void stopInstance(String name) throws HawkInstanceNotFound, TException {
	final HModel model = getHawkByName(name);
	if (model.isRunning()) {
		model.stop(ShutdownRequestType.ALWAYS);
		removeStateListener(model);
	}
}
 
開發者ID:mondo-project,項目名稱:mondo-integration,代碼行數:9,代碼來源:HawkThriftIface.java

示例5: _hawkStopInstance

import org.hawk.core.IModelIndexer.ShutdownRequestType; //導入依賴的package包/類
public Object _hawkStopInstance(CommandInterpreter intp) throws Exception {
	checkConnected();
	final String name = requiredArgument(intp, "name");
	final HModel hi = hawkManager.getHawkByName(name);
	if (hi.isRunning()) {
		hi.stop(ShutdownRequestType.ALWAYS);
		return String.format("Stopped instance %s", name);
	} else {
		return String.format("Instance %s was already stopped", name);
	}
}
 
開發者ID:mondo-project,項目名稱:mondo-integration,代碼行數:12,代碼來源:ServerCommandProvider.java

示例6: consoleInteraction

import org.hawk.core.IModelIndexer.ShutdownRequestType; //導入依賴的package包/類
private static Thread consoleInteraction(final IModelIndexer i2) {
	return new Thread() {
		@Override
		public void run() {
			while (true) {
				BufferedReader r = new BufferedReader(
						new InputStreamReader(System.in));
				try {
					String s = r.readLine();
					if (s.equalsIgnoreCase("quit")
							|| s.equalsIgnoreCase("exit")
							|| s.equalsIgnoreCase("e")) {
						i2.shutdown(ShutdownRequestType.ONLY_LOCAL);
						System.exit(0);
					}
					if (s.equalsIgnoreCase("query")
							|| s.equalsIgnoreCase("q")) {
						q.query(i, query, null);
					}
					if (s.equalsIgnoreCase("nuke")) {
						i2.delete();
						System.exit(0);
					}
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		};
	};
}
 
開發者ID:mondo-project,項目名稱:mondo-hawk,代碼行數:31,代碼來源:IFC_Runtime_example.java

示例7: consoleInteraction

import org.hawk.core.IModelIndexer.ShutdownRequestType; //導入依賴的package包/類
private static Thread consoleInteraction(final IModelIndexer i2) {
	return new Thread() {
		@Override
		public void run() {
			while (true) {
				BufferedReader r = new BufferedReader(
						new InputStreamReader(System.in));
				try {
					String s = r.readLine();
					if (s.equalsIgnoreCase("quit")
							|| s.equalsIgnoreCase("exit")
							|| s.equalsIgnoreCase("e")) {
						i2.shutdown(ShutdownRequestType.ONLY_LOCAL);
						System.exit(0);
					}
					if (s.equalsIgnoreCase("query")
							|| s.equalsIgnoreCase("q")) {

						q.query(i, query3, null);

					}

				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		};
	};
}
 
開發者ID:mondo-project,項目名稱:mondo-hawk,代碼行數:30,代碼來源:Modelio_Titan_Runtime_example.java

示例8: stopAllRunningInstances

import org.hawk.core.IModelIndexer.ShutdownRequestType; //導入依賴的package包/類
public boolean stopAllRunningInstances(ShutdownRequestType reqType) {
	HModel.getConsole().println("Shutting down hawk:");
	for (HModel hm : all) {
		if (hm.isRunning()) {
			HModel.getConsole().println(String.format("Stopping %s (%s)", hm.getName(), hm.getFolder()));
			hm.stop(reqType);
		}
	}
	return true;
}
 
開發者ID:mondo-project,項目名稱:mondo-hawk,代碼行數:11,代碼來源:HManager.java

示例9: stop

import org.hawk.core.IModelIndexer.ShutdownRequestType; //導入依賴的package包/類
public void stop(ShutdownRequestType requestType) {
	try {
		hawk.getModelIndexer().shutdown(requestType);
	} catch (Exception e) {
		getConsole().printerrln(e);
	}
}
 
開發者ID:mondo-project,項目名稱:mondo-hawk,代碼行數:8,代碼來源:HModel.java

示例10: preShutdown

import org.hawk.core.IModelIndexer.ShutdownRequestType; //導入依賴的package包/類
@Override
public boolean preShutdown(IWorkbench workbench, boolean forced) {
	System.out.println("(PRE SHUTDOWN) Shutting down Hawk");
	HUIManager.getInstance().stopAllRunningInstances(
			ShutdownRequestType.ONLY_LOCAL);
	return true;
}
 
開發者ID:mondo-project,項目名稱:mondo-hawk,代碼行數:8,代碼來源:HUIManager.java

示例11: teardown

import org.hawk.core.IModelIndexer.ShutdownRequestType; //導入依賴的package包/類
@After
public void teardown() throws Exception {
	indexer.shutdown(ShutdownRequestType.ALWAYS);
	db.delete();
}
 
開發者ID:mondo-project,項目名稱:mondo-hawk,代碼行數:6,代碼來源:ModelIndexingTest.java


注:本文中的org.hawk.core.IModelIndexer.ShutdownRequestType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。