Module com.machinezoo.hookless
Package com.machinezoo.hookless.prefs
Class AbstractReactivePreferences
- java.lang.Object
-
- com.machinezoo.hookless.prefs.ReactivePreferences
-
- com.machinezoo.hookless.prefs.AbstractReactivePreferences
-
@StubDocs @NoTests public abstract class AbstractReactivePreferences extends ReactivePreferences
Reactive version ofAbstractPreferences
.
-
-
Constructor Summary
Constructors Constructor Description AbstractReactivePreferences(AbstractReactivePreferences parent, String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
absolutePath()
String[]
childrenNames()
protected abstract String[]
childrenNamesSpi()
protected abstract AbstractReactivePreferences
childSpi(String name)
CompletableFuture<Void>
clear()
CompletableFuture<Void>
flush()
protected abstract CompletableFuture<Void>
flushSpi()
String
get(String key, String def)
boolean
getBoolean(String key, boolean def)
byte[]
getByteArray(String key, byte[] def)
double
getDouble(String key, double def)
float
getFloat(String key, float def)
int
getInt(String key, int def)
long
getLong(String key, long def)
protected abstract String
getSpi(String key)
boolean
isUserNode()
String[]
keys()
protected abstract String[]
keysSpi()
String
name()
ReactivePreferences
node(String path)
boolean
nodeExists(String path)
ReactivePreferences
parent()
void
put(String key, String value)
void
putBoolean(String key, boolean value)
void
putByteArray(String key, byte[] value)
void
putDouble(String key, double value)
void
putFloat(String key, float value)
void
putInt(String key, int value)
void
putLong(String key, long value)
protected abstract void
putSpi(String key, String value)
void
remove(String key)
CompletableFuture<Void>
removeNode()
protected abstract CompletableFuture<Void>
removeNodeSpi()
protected abstract void
removeSpi(String key)
-
Methods inherited from class com.machinezoo.hookless.prefs.ReactivePreferences
systemNodeForPackage, systemRoot, toString, userNodeForPackage, userRoot, wrap
-
-
-
-
Field Detail
-
lock
protected final Object lock
-
-
Constructor Detail
-
AbstractReactivePreferences
public AbstractReactivePreferences(AbstractReactivePreferences parent, String name)
-
-
Method Detail
-
parent
public ReactivePreferences parent()
- Specified by:
-
parent
in classReactivePreferences
-
name
public String name()
- Specified by:
-
name
in classReactivePreferences
-
absolutePath
public String absolutePath()
- Specified by:
-
absolutePath
in classReactivePreferences
-
isUserNode
public boolean isUserNode()
- Specified by:
-
isUserNode
in classReactivePreferences
-
childSpi
protected abstract AbstractReactivePreferences childSpi(String name)
-
node
public ReactivePreferences node(String path)
- Specified by:
-
node
in classReactivePreferences
-
childrenNamesSpi
protected abstract String[] childrenNamesSpi() throws BackingStoreException
- Throws:
-
BackingStoreException
-
childrenNames
public String[] childrenNames() throws BackingStoreException
- Specified by:
-
childrenNames
in classReactivePreferences
- Throws:
-
BackingStoreException
-
nodeExists
public boolean nodeExists(String path) throws BackingStoreException
- Specified by:
-
nodeExists
in classReactivePreferences
- Throws:
-
BackingStoreException
-
removeNodeSpi
protected abstract CompletableFuture<Void> removeNodeSpi()
-
removeNode
public CompletableFuture<Void> removeNode()
- Specified by:
-
removeNode
in classReactivePreferences
-
keysSpi
protected abstract String[] keysSpi() throws BackingStoreException
- Throws:
-
BackingStoreException
-
keys
public String[] keys() throws BackingStoreException
- Specified by:
-
keys
in classReactivePreferences
- Throws:
-
BackingStoreException
-
get
public String get(String key, String def)
- Specified by:
-
get
in classReactivePreferences
-
getBoolean
public boolean getBoolean(String key, boolean def)
- Specified by:
-
getBoolean
in classReactivePreferences
-
getByteArray
public byte[] getByteArray(String key, byte[] def)
- Specified by:
-
getByteArray
in classReactivePreferences
-
getDouble
public double getDouble(String key, double def)
- Specified by:
-
getDouble
in classReactivePreferences
-
getFloat
public float getFloat(String key, float def)
- Specified by:
-
getFloat
in classReactivePreferences
-
getInt
public int getInt(String key, int def)
- Specified by:
-
getInt
in classReactivePreferences
-
getLong
public long getLong(String key, long def)
- Specified by:
-
getLong
in classReactivePreferences
-
put
public void put(String key, String value)
- Specified by:
-
put
in classReactivePreferences
-
putBoolean
public void putBoolean(String key, boolean value)
- Specified by:
-
putBoolean
in classReactivePreferences
-
putByteArray
public void putByteArray(String key, byte[] value)
- Specified by:
-
putByteArray
in classReactivePreferences
-
putDouble
public void putDouble(String key, double value)
- Specified by:
-
putDouble
in classReactivePreferences
-
putFloat
public void putFloat(String key, float value)
- Specified by:
-
putFloat
in classReactivePreferences
-
putInt
public void putInt(String key, int value)
- Specified by:
-
putInt
in classReactivePreferences
-
putLong
public void putLong(String key, long value)
- Specified by:
-
putLong
in classReactivePreferences
-
removeSpi
protected abstract void removeSpi(String key)
-
remove
public void remove(String key)
- Specified by:
-
remove
in classReactivePreferences
-
clear
public CompletableFuture<Void> clear()
- Specified by:
-
clear
in classReactivePreferences
-
flushSpi
protected abstract CompletableFuture<Void> flushSpi()
-
flush
public CompletableFuture<Void> flush()
- Specified by:
-
flush
in classReactivePreferences
-
-