List of usage examples for org.apache.zookeeper.server ZKDatabase commit
public void commit() throws IOException
From source file:com.netflix.curator.test.TestingServer.java
License:Apache License
/** * Stop the server without deleting the temp directory *//*www.j a v a2s . c om*/ public void stop() { if (!isStopped.compareAndSet(false, true)) { return; } ZKDatabase zkDb = server.getZKDatabase(); try { zkDb.commit(); zkDb.close(); } catch (Throwable e) { System.err.println("Error closing logs"); e.printStackTrace(); } try { server.shutdown(); ServerHelper.shutdownFactory(factory); } catch (Throwable e) { System.err.println("Error shutting down server"); e.printStackTrace(); } }