List of usage examples for com.mongodb MongoClient fsyncAndLock
@Deprecated
public CommandResult fsyncAndLock()
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 v a 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(); }