org.apache.felix.prefs

## Interface BackingStore

    public interface BackingStore

The BackingStore for the preferences. This interface allows for different implementation strategies.

### Method Summary

Methods
`Long[]` `availableBundles()` Return all bundle ids for which preferences are stored..
`PreferencesImpl` `load(BackingStoreManager manager, PreferencesDescription desc)` Load the preferences for the given description.
`PreferencesImpl[]` `loadAll(BackingStoreManager manager, Long bundleId)` Load all preferences for this bundle.
`void` `remove(Long bundleId)` Remove all preferences stored for this bundle.
`void` `store(PreferencesImpl prefs)` Store the current preferences and its children in the backing store.
`void` `update(PreferencesImpl prefs)` Update the current preferences and its children from the backing store.

### Method Detail

#### 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`