本文整理匯總了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();
}
}
示例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();
}
示例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");
}
}
示例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;
}