|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.prefs.Preferences
java.util.prefs.AbstractPreferences
java.util.prefs.FilePreferencesImpl
class FilePreferencesImpl
Default implementation of AbstractPreferences for Linux platform,
using file system as back end.
TODO some sync mechanism with backend, Performance - check file edit date
| Field Summary |
|---|
| Fields inherited from class java.util.prefs.AbstractPreferences |
|---|
lock, newNode, userNode |
| Fields inherited from class java.util.prefs.Preferences |
|---|
MAX_KEY_LENGTH, MAX_NAME_LENGTH, MAX_VALUE_LENGTH |
| Constructor Summary | |
|---|---|
FilePreferencesImpl(boolean userNode)
Construct root FilePreferencesImpl instance, construct
user root if userNode is true, system root otherwise |
|
| Method Summary | |
|---|---|
protected String[] |
childrenNamesSpi()
Return names of this node's all children , or empty array if this node has no child. |
protected AbstractPreferences |
childSpi(String name)
Return the child preference node with the given name, and create new one if it does not exist. |
protected void |
flushSpi()
Flush changes of this node to the backing store. |
protected String |
getSpi(String key)
Get the preference value mapped to the given key. |
protected String[] |
keysSpi()
Return all keys of this node's preferences, or empty array if no preference found on this node. |
protected void |
putSpi(String name,
String value)
Put the given key-value pair into this node. |
protected void |
removeNodeSpi()
Remove this node from the preference hierarchy tree. |
protected void |
removeSpi(String key)
Remove the preference with the given key. |
protected void |
syncSpi()
Synchronize this node with the backing store. |
| Methods inherited from class java.util.prefs.AbstractPreferences |
|---|
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, toString |
| Methods inherited from class java.util.prefs.Preferences |
|---|
importPreferences, systemNodeForPackage, systemRoot, userNodeForPackage, userRoot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
FilePreferencesImpl(boolean userNode)
FilePreferencesImpl instance, construct
user root if userNode is true, system root otherwise
| Method Detail |
|---|
protected String[] childrenNamesSpi()
throws BackingStoreException
AbstractPreferences
childrenNamesSpi in class AbstractPreferencesBackingStoreException - if backing store is unavailable or causes operation failureprotected AbstractPreferences childSpi(String name)
AbstractPreferencesThe new creation is not required to be persisted immediately until the flush method is invoked.
childSpi in class AbstractPreferences
protected void flushSpi()
throws BackingStoreException
AbstractPreferencesflush() method.
flushSpi in class AbstractPreferencesBackingStoreException - if backing store is unavailable or causes operation failureprotected String getSpi(String key)
AbstractPreferences
getSpi in class AbstractPreferenceskey - the given key to be searched for
protected String[] keysSpi()
throws BackingStoreException
AbstractPreferences
keysSpi in class AbstractPreferencesBackingStoreException - if backing store is unavailable or causes operation failure
protected void putSpi(String name,
String value)
AbstractPreferences
putSpi in class AbstractPreferencesname - the given preference keyvalue - the given preference value
protected void removeNodeSpi()
throws BackingStoreException
AbstractPreferencesPreferences.removeNode() should invoke
this method multi-times in bottom-up pattern. The removal is not required
to be persisted at once until the it is flushed.
removeNodeSpi in class AbstractPreferencesBackingStoreException - if backing store is unavailable or causes operation failureprotected void removeSpi(String key)
AbstractPreferences
removeSpi in class AbstractPreferenceskey - the given key to removed
protected void syncSpi()
throws BackingStoreException
AbstractPreferencessync() method.
syncSpi in class AbstractPreferencesBackingStoreException - if backing store is unavailable or causes operation failure
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||