List of usage examples for com.mongodb MongoClient unlock
@Deprecated
public DBObject unlock()
From source file:com.edgytech.umongo.ServerPanel.java
License:Apache License
public void fsyncAndLock(ButtonBase button) { if (!UMongo.instance.getGlobalStore().confirmLockingOperation()) { return;/*from w w w.ja va 2 s . co m*/ } new DbJob() { @Override public Object doRun() throws IOException { MongoClient mongo = getServerNode().getServerMongoClient(); boolean locked = mongo.isLocked(); if (locked) { return mongo.unlock(); } return mongo.fsyncAndLock(); } @Override public String getNS() { return null; } @Override public String getShortName() { return "FSync And Lock"; } @Override public void wrapUp(Object res) { try { // looks like the unlock doesnt take effect right away Thread.sleep(1000); } catch (InterruptedException ex) { } super.wrapUp(res); } }.addJob(); }