public class FilePreferencesImpl extends AbstractPreferences
AbstractPreferences for the Linux
platform, using the file system as its back end.
TODO some sync mechanism with backend, Performance - check file edit datelock, newNodeMAX_KEY_LENGTH, MAX_NAME_LENGTH, MAX_VALUE_LENGTH| Constructor and Description |
|---|
FilePreferencesImpl(String path,
boolean isUserNode)
Construct root
FilePreferencesImpl instance rooted
at the given path. |
| Modifier and Type | Method and Description |
|---|---|
protected String[] |
childrenNamesSpi()
Returns the names of all of the child nodes of this node or an empty
array if this node has no children.
|
protected AbstractPreferences |
childSpi(String name)
Returns the child preference node with the given name, creating it
if it does not exist.
|
protected void |
flushSpi()
Flushes changes of this node to the backing store.
|
protected String |
getSpi(String key)
Gets the preference value mapped to the given key.
|
protected String[] |
keysSpi()
Returns an array of all preference keys of this node or an empty array if
no preferences have been found.
|
protected void |
putSpi(String name,
String value)
Puts the given key-value pair into this node.
|
protected void |
removeNodeSpi()
Removes this node from the preference hierarchy tree.
|
protected void |
removeSpi(String key)
Removes the preference with the specified key.
|
protected void |
syncSpi()
Synchronizes this node with the backing store.
|
absolutePath, addNodeChangeListener, addPreferenceChangeListener, cachedChildren, childrenNames, clear, exportNode, exportSubtree, flush, get, getBoolean, getByteArray, getChild, getDouble, getFloat, getInt, getLong, isRemoved, isUserNode, keys, name, node, nodeExists, parent, put, putBoolean, putByteArray, putDouble, putFloat, putInt, putLong, remove, removeNode, removeNodeChangeListener, removePreferenceChangeListener, sync, toStringimportPreferences, setPreferencesFactory, systemNodeForPackage, systemRoot, userNodeForPackage, userRootpublic FilePreferencesImpl(String path, boolean isUserNode)
FilePreferencesImpl instance rooted
at the given path.protected String[] childrenNamesSpi() throws BackingStoreException
AbstractPreferenceschildrenNamesSpi in class AbstractPreferencesBackingStoreException - if the backing store is unavailable or causes an operation
failure.protected AbstractPreferences childSpi(String name)
AbstractPreferencesThe new creation is not required to be persisted immediately until the flush method will be invoked.
childSpi in class AbstractPreferencesname - the name of the child preference to be returned.protected void flushSpi()
throws BackingStoreException
AbstractPreferencesflush().flushSpi in class AbstractPreferencesBackingStoreException - if the backing store is unavailable or causes an operation
failure.protected String getSpi(String key)
AbstractPreferencesnull return value.getSpi in class AbstractPreferenceskey - the given key to be searched for.protected String[] keysSpi() throws BackingStoreException
AbstractPreferenceskeysSpi in class AbstractPreferencesBackingStoreException - if the backing store is unavailable or causes an operation
failure.protected void putSpi(String name, String value)
AbstractPreferencesputSpi in class AbstractPreferencesname - the given preference key.value - the given preference value.protected void removeNodeSpi()
throws BackingStoreException
AbstractPreferencesPreferences.removeNode() should
invoke this method multiple-times in bottom-up pattern. The removal is
not required to be persisted until after it is flushed.removeNodeSpi in class AbstractPreferencesBackingStoreException - if the backing store is unavailable or causes an operation
failure.protected void removeSpi(String key)
AbstractPreferencesremoveSpi in class AbstractPreferenceskey - the key of the preference that is to be removed.protected void syncSpi()
throws BackingStoreException
AbstractPreferencessync().syncSpi in class AbstractPreferencesBackingStoreException - if the backing store is unavailable or causes an operation
failure.