Package org.apache.zookeeper.common.AtomicFileWritingIdiom

Examples of org.apache.zookeeper.common.AtomicFileWritingIdiom.WriterStatement


        final File tmp = new File(tmpdir, "target.txt.tmp");
        target.delete();
        assertFalse("file should not exist", target.exists());
        boolean exception = false;
        try {
            new AtomicFileWritingIdiom(target, new WriterStatement() {
                @Override
                public void write(Writer os) throws IOException {
                    os.write("after");
                    os.flush();
                    assertTrue("implementation of AtomicFileOutputStream has changed, update the test", tmp.exists());
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.common.AtomicFileWritingIdiom.WriterStatement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.