当前位置: 首页>>代码示例>>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;未经允许,请勿转载。