Package com.sleepycat.je

Examples of com.sleepycat.je.Environment.sync()


                System.out.println("Cleaned " + cleaned + " files.");
            CheckpointConfig cp = new CheckpointConfig();
            cp.setForce(true);
            environment.checkpoint(null);
            environment.compress();
            environment.sync();
            System.out.println("Cleaning, Checkpointing and compression completed.");
        }

        System.out.println();
        System.out.println("iteration read write:");
View Full Code Here


        envConfig.setAllowCreate(true);
        Environment env = new Environment(envHome, envConfig);

        try {
            /* Make an environment. */
            env.sync();

            /* Add an extra, 0 length file */
            EnvironmentImpl envImpl = DbInternal.envGetEnvironmentImpl(env);

            File newFile = new File(envHome, "00000001.jdb");
View Full Code Here

        EnvironmentConfig envConfig = TestUtils.initEnvConfig();
        envConfig.setAllowCreate(false);
        envConfig.setTransactional(true);

        Environment env = new Environment(envHome, envConfig);
        env.sync();
        env.close();

        assertEquals(origFileSize, logFile.length());
    }
}
View Full Code Here

        }
        if (env != null) {
            try {
                // This sync flushes whats in RAM. Its expensive operation.
                // Without, data can be lost. Not for transactional operation.
                env.sync();
            } catch (DatabaseException e) {
                logger.severe(e.getMessage());
            }
        }
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.