KP - Key path.public interface PropertySet<KP> extends Adaptable, Versionable<PropertySet<KP>>
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(KP key)
Removes callable to be cooked from the cooking queue, converting it to
lazy, if it is not already cooked.
|
void |
cancelAll()
Cancels all unfinished background computations.
|
void |
clear()
Removes all entries from the property set
|
void |
cook(KP key,
Callable<?> callable)
Puts callable to the property set for asynchronous invocation to retrieve
value at some point in the future.
|
void |
cook(KP key,
Callable<?> callable,
long delay,
TimeUnit timeUnit)
Puts callable to the property set for asynchronous invocation to retrieve
value at some point in the future after specified delay.
|
void |
cooking(KP key,
Future<?> future)
Puts value which is not ready yet but "is being cooked by another thread"
to the property set to be used at some point of time in the future.
|
Object |
get(KP key)
Retrieves property without conversion.
|
<T> T |
get(KP key,
Class<T> type)
Retrieves property with conversion to target type.
|
<T> T |
get(KP key,
Class<T> type,
long timeout,
TimeUnit unit)
Retrieves property with conversion to target type.
|
<T> T |
get(KP key,
Class<T> type,
T defaultValue) |
<T> T |
get(KP key,
Class<T> type,
T defaultValue,
long timeout,
TimeUnit unit) |
Object |
get(KP key,
long timeout,
TimeUnit unit)
Retrieves property without conversion.
|
Object |
get(KP key,
Object defaultValue) |
Object |
get(KP key,
Object defaultValue,
long timeout,
TimeUnit unit) |
Object |
invoke(KP key,
Object... args)
Invokes invocable at given key.
|
Set<KP> |
keySet() |
void |
lazy(KP key,
Callable<?> callable)
Puts callable to the property set.
|
void |
mount(KP prefix,
PropertySet<KP> source)
Mounts source property set at specified prefix.
|
void |
remove(KP key)
Removes property from the set.
|
void |
set(KP key,
Object value)
Sets property.
|
void |
setAll(PropertySet<KP> source)
Copies all entries from the source property set to self.
|
void |
setInvocable(KP key,
Invocable<PropertySet<KP>,?,KP,?> invocable)
Convenience method to set invocable.
|
Object |
shadowGet(KP key)
Retrieves shadow property without conversion.
|
<T> T |
shadowGet(KP key,
Class<T> type)
Retrieves property with conversion to target type.
|
<T> T |
shadowGet(KP key,
Class<T> type,
long timeout,
TimeUnit unit)
Retrieves property with conversion to target type.
|
<T> T |
shadowGet(KP key,
Class<T> type,
T defaultValue) |
<T> T |
shadowGet(KP key,
Class<T> type,
T defaultValue,
long timeout,
TimeUnit unit) |
Object |
shadowGet(KP key,
long timeout,
TimeUnit unit)
Retrieves shadow property without conversion.
|
Object |
shadowGet(KP key,
Object defaultValue) |
Object |
shadowGet(KP key,
Object defaultValue,
long timeout,
TimeUnit unit) |
Object |
shadowInvoke(KP key,
Object... args)
Invokes invocable in the shadow property set at given key.
|
PropertySet<KP> |
subset(KP prefix) |
void |
unmount(KP prefix) |
getAdaptercreateVersionPropertySet<KP> subset(KP prefix)
prefix - void remove(KP key)
name - void clear()
void mount(KP prefix, PropertySet<KP> source)
prefix - source - void setAll(PropertySet<KP> source)
source - Object get(KP key, Object defaultValue)
key - Property key.defaultValue - Default value.<T> T get(KP key, Class<T> type, T defaultValue)
key - Property key.type - target type.defaultValue - Default value.Object get(KP key, Object defaultValue, long timeout, TimeUnit unit)
key - Property key.defaultValue - Default value.<T> T get(KP key, Class<T> type, long timeout, TimeUnit unit)
<T> T get(KP key, Class<T> type, T defaultValue, long timeout, TimeUnit unit)
key - Property key.type - target type.defaultValue - Default value.void setInvocable(KP key, Invocable<PropertySet<KP>,?,KP,?> invocable)
key - invocable - void cook(KP key, Callable<?> callable)
name - callable - void cook(KP key, Callable<?> callable, long delay, TimeUnit timeUnit)
name - callable - delay - void cooking(KP key, Future<?> future)
name - future - Value being cooked.void lazy(KP key, Callable<?> callable)
get() method for the given name is invoked.name - callable - void cancel(KP key)
name - void cancelAll()
Object invoke(KP key, Object... args)
Object shadowInvoke(KP key, Object... args)
Object shadowGet(KP key, Object defaultValue)
key - Property key.defaultValue - Default value.<T> T shadowGet(KP key, Class<T> type, T defaultValue)
key - Property key.type - target type.defaultValue - Default value.Object shadowGet(KP key, long timeout, TimeUnit unit)
Object shadowGet(KP key, Object defaultValue, long timeout, TimeUnit unit)
key - Property key.defaultValue - Default value.<T> T shadowGet(KP key, Class<T> type, long timeout, TimeUnit unit)