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


Java DatabaseIntf類代碼示例

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


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

示例1: onActivityResult

import localhost.iillyyaa2033.nmud.core.services.databases.DatabaseIntf; //導入依賴的package包/類
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
	if (resultCode == Activity.RESULT_OK) {
		final String path = data.getData().getPath();
		Toast.makeText(this, path, Toast.LENGTH_SHORT).show();

		new Thread(){

			@Override
			public void run() {
				// TODO: криво будет работать на удаленке!
				List<DatabaseIntf> l = Base.getServiceByClass(DatabaseIntf.class);

				if (l.size() > 0)
					l.get(0).restoreData(new File(path));
			}

		}.start();
	}
}
 
開發者ID:nmud,項目名稱:nmud-demo,代碼行數:21,代碼來源:MainActivity.java

示例2: doDbExport

import localhost.iillyyaa2033.nmud.core.services.databases.DatabaseIntf; //導入依賴的package包/類
void doDbExport() {
	new Thread(){

		@Override
		public void run() {
			// TODO: криво будет работать на удаленке!
			List<DatabaseIntf> l = Base.getServiceByClass(DatabaseIntf.class);

			if (l.size() > 0)
				l.get(0).saveData(new File(Base.datapath + "/ru/databases/"));
		}

	}.start();
}
 
開發者ID:nmud,項目名稱:nmud-demo,代碼行數:15,代碼來源:MainActivity.java

示例3: checkCDB

import localhost.iillyyaa2033.nmud.core.services.databases.DatabaseIntf; //導入依賴的package包/類
void checkCDB() {
	if (cdb == null) {
		cdb = Base.getServiceByName(DatabaseIntf.class, clientsDatabaseName);
		users = URI.create("db://" + cdb.getStringId() + "/users");
		avatars = URI.create("db://" + cdb.getStringId() + "/avatars");
		cmds = URI.create("db://" + cdb.getStringId() + "/commands");
		cmdsBlk = URI.create("db://" + cdb.getStringId() + "/commands_blocks");
		scripts = URI.create("db://" + cdb.getStringId() + "/scripts");
		announcements = URI.create("db://" + cdb.getStringId() + "/announcements");
	}
}
 
開發者ID:nmud,項目名稱:nmud-core,代碼行數:12,代碼來源:ClientManager.java

示例4: build

import localhost.iillyyaa2033.nmud.core.services.databases.DatabaseIntf; //導入依賴的package包/類
public ClientManager build() throws IOException {
	if (port == -1)
		port = 9999;

	ClientManager service = new ClientManager(name, port);
	service.maxTelnetClients = maxClients;
	service.acceptors = acceptors;

	service.cdb = Base.getServiceByName(DatabaseIntf.class, clientsDatabaseName);
	return service;
}
 
開發者ID:nmud,項目名稱:nmud-core,代碼行數:12,代碼來源:ClientManager.java


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