Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

23
LINES

< > BotCompany Repo | #1007484 // shutDownDB - shut down a remote DB

JavaX fragment (include)

// returns true if DB was running
static bool shutDownDB(S dbID) {
  RemoteDB db = connectToDBOpt(dbID);
  if (db != null) {
    print("Shutting down DB " + dbID + "...");
    try {
      db.xshutdown();
    } catch e {
      print("Possibly OK: " + exceptionToStringShort(e));
    }
    db.close();
    if (dbRunning(dbID)) {
      sleepSeconds(5);
      if (dbRunning(dbID))
        fail("Could not should down DB " + dbID);
    }
    print("DB shut down.");
    true;
  } else {
    print("DB not running.");
    false;
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1007484
Snippet name: shutDownDB - shut down a remote DB
Eternal ID of this version: #1007484/3
Text MD5: 1bff1b5a0135ccb5b9b6092988638b11
Author: stefan
Category: javax / concepts / rpc
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-24 14:59:51
Source code size: 550 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 497 / 499
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)