Package com.cybozu.vmbkp.profile

Examples of com.cybozu.vmbkp.profile.ProfileAllVm


     * @return ProfileAllVm object.
     */
    public static ProfileAllVm initializeProfileAllVm()
        throws Exception
    {
        ProfileAllVm profAllVm;
        String profAllVmPath = cfgGlobal_.getProfileAllVmPath();
           
        boolean isExist = false;
        try {
            profAllVm = new ProfileAllVm(profAllVmPath);
            isExist = true;
           
        } catch (NotNormalFileException e) {
            logger_.info
                (String.format
                 ("%s is not found. create it.", profAllVmPath));
            profAllVm = new ProfileAllVm();
            isExist = false;
        }           

        if (isExist == false) {
            profAllVm.write(profAllVmPath);
        }

        /* Reload the profile to counteract the case where
           another processes wrote the profile
           during the above initialization. */
        try {
            profAllVm.lock(60);
            profAllVm.reload();

        } catch (Exception e) {
            throw e;
           
        } finally {
            profAllVm.unlock();
        }

        return profAllVm;
    }
View Full Code Here

TOP

Related Classes of com.cybozu.vmbkp.profile.ProfileAllVm

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.