Examples of sync()


Examples of java.util.prefs.Preferences.sync()

      preferences.remove(FURNITURE_RESOURCES_REMOTE_URL_BASE);
    }
   
    try {
      // Write preferences
      preferences.sync();
    } catch (BackingStoreException ex) {
      throw new RecorderException("Couldn't write preferences", ex);
    }
  }
 
View Full Code Here

Examples of java.util.prefs.Preferences.sync()

    }

    static void setPreference(final String name, final Object value, final boolean flush) {
        Preferences prefs = getPreferences();
        try {
            prefs.sync();
            if (value instanceof Long) {
                prefs.putLong(name, (Long) value);
            } else if (value instanceof Integer) {
                prefs.putInt(name, (Integer) value);
            } else if (value instanceof int[]) {
View Full Code Here

Examples of java.util.prefs.Preferences.sync()

    }

    static int getPreference(final String name, final int defaultValue) {
        Preferences prefs = getPreferences();
        try {
            prefs.sync();
            return prefs.getInt(name, defaultValue);
        } catch (BackingStoreException ioe) {
            // ignore
        }
        return defaultValue;
View Full Code Here

Examples of java.util.prefs.Preferences.sync()

    }

    static int[] getPreference(final String name, final int[] defaultValues) {
        Preferences prefs = getPreferences();
        try {
            prefs.sync();
            String value = prefs.get(name, null);
            if (value != null) {
                String[] values = value.split(",");
                int[] result = new int[values.length];
                for (int i = 0; i < values.length; i++) {
View Full Code Here

Examples of java.util.prefs.Preferences.sync()

            XmlDocument doc = new XmlDocument(ExportTag);
            LastExportOptions.write(doc.getRoot());
            saveXmlPrefs(ExportTag, doc);
        }
        try {
            prefs.sync();
        }
        catch (BackingStoreException e) {
            showError(LOCALE.get("PrefsWriteError"), e, null);
        }
    }
View Full Code Here

Examples of java.util.prefs.Preferences.sync()

    static void startupStarted() {
        Preferences prefs = Preferences.userRoot().node("/com/lightcrafts/app");
        prefs.putBoolean(StartupKey, false);
        try {
            prefs.sync();
        }
        catch (BackingStoreException e) {
            System.err.println("Couldn't access Preferences in StartupCrash");
            e.printStackTrace();
        }
View Full Code Here

Examples of krati.core.array.basic.DynamicIntArray.sync()

        for (MemberDataUpdate u : updates) {
            assertEquals(array1.get(u.getMemberId()), u.getData());
        }
       
        // Sync the first array
        array1.sync();
       
        // Create the second array, which should load data from cache
        DynamicIntArray array2 = new DynamicIntArray(maxEntrySize, maxEntries, TEST_OUTPUT_DIR);
        assertTrue("array2.getHWMark() is greater than array1.getHWMark()", array2.getHWMark() <= array1.getHWMark());
       
View Full Code Here

Examples of krati.core.array.basic.DynamicLongArray.sync()

        for (MemberDataUpdate u : updates) {
            assertEquals(array1.get(u.getMemberId()), u.getData());
        }
       
        // Sync the first array
        array1.sync();
       
        // Create the second array, which should load data from cache
        DynamicLongArray array2 = new DynamicLongArray(maxEntrySize, maxEntries, TEST_OUTPUT_DIR);
        assertTrue("array3.getHWMark() is greater than array1.getHWMark()", array2.getHWMark() <= array1.getHWMark());
       
View Full Code Here

Examples of krati.core.array.basic.DynamicShortArray.sync()

        for (MemberDataUpdate u : updates) {
            assertEquals(array1.get(u.getMemberId()), (short)u.getData());
        }
       
        // Sync the first array
        array1.sync();
       
        // Create the second array, which should load data from cache
        DynamicShortArray array2 = new DynamicShortArray(maxEntrySize, maxEntries, TEST_OUTPUT_DIR);
        assertTrue("array2.getHWMark() is greater than array1.getHWMark()", array2.getHWMark() <= array1.getHWMark());
       
View Full Code Here

Examples of krati.store.AbstractDataArray.sync()

            dataArray.persist();
           
            StatsLog.logger.info(">>> validate");
            validate(dataArray);
           
            dataArray.sync();
        } catch(Exception e) {
            e.printStackTrace();
        }
       
        cleanTestOutput();
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.