Interface BackingStore

All Known Implementing Classes:
DataFileBackingStoreImpl, StreamBackingStoreImpl

public interface BackingStore
The BackingStore for the preferences. This interface allows for different implementation strategies.
  • Method Details

    • store

      void store(PreferencesImpl prefs) throws org.osgi.service.prefs.BackingStoreException
      Store the current preferences and its children in the backing store. The store should check, if the preferences have changed, it should also check all children.
      Parameters:
      prefs - The preferences.
      Throws:
      org.osgi.service.prefs.BackingStoreException
    • update

      void update(PreferencesImpl prefs) throws org.osgi.service.prefs.BackingStoreException
      Update the current preferences and its children from the backing store.
      Throws:
      org.osgi.service.prefs.BackingStoreException
    • availableBundles

      Long[] availableBundles()
      Return all bundle ids for which preferences are stored..
      Returns:
      Return an array of bundle ids or an empty array.
    • remove

      void remove(Long bundleId) throws org.osgi.service.prefs.BackingStoreException
      Remove all preferences stored for this bundle.
      Parameters:
      bundleId - The bundle id.
      Throws:
      org.osgi.service.prefs.BackingStoreException
    • load

      PreferencesImpl load(BackingStoreManager manager, PreferencesDescription desc) throws org.osgi.service.prefs.BackingStoreException
      Load the preferences for the given description.
      Parameters:
      manager - The backing store manager which should be passed to new preferences implementations.
      desc -
      Returns:
      A new preferences object or null if it's not available in the backing store.
      Throws:
      org.osgi.service.prefs.BackingStoreException
    • loadAll

      PreferencesImpl[] loadAll(BackingStoreManager manager, Long bundleId) throws org.osgi.service.prefs.BackingStoreException
      Load all preferences for this bundle.
      Parameters:
      manager - The backing store manager which should be passed to new preferences implementations.
      bundleId - The bundle id.
      Returns:
      An array with the preferences or an empty array.
      Throws:
      org.osgi.service.prefs.BackingStoreException