public interface ParameterTree
ParameterServer
.
A parameter server is a shared, multi-variate dictionary that is accessible via network APIs. Nodes use this server to store and retrieve parameters at runtime. As it is not designed for high-performance, it is best used for static, non-binary data such as configuration parameters. It is meant to be globally viewable so that tools can easily inspect the configuration state of the system and modify if necessary.
Modifier and Type | Method and Description |
---|---|
void |
addParameterListener(GraphName name,
ParameterListener listener)
Subscribes to changes to the specified parameter.
|
void |
addParameterListener(java.lang.String name,
ParameterListener listener) |
void |
delete(GraphName name)
Deletes a specified parameter.
|
void |
delete(java.lang.String name) |
boolean |
getBoolean(GraphName name) |
boolean |
getBoolean(GraphName name,
boolean defaultValue) |
boolean |
getBoolean(java.lang.String name) |
boolean |
getBoolean(java.lang.String name,
boolean defaultValue) |
double |
getDouble(GraphName name) |
double |
getDouble(GraphName name,
double defaultValue) |
double |
getDouble(java.lang.String name) |
double |
getDouble(java.lang.String name,
double defaultValue) |
int |
getInteger(GraphName name) |
int |
getInteger(GraphName name,
int defaultValue) |
int |
getInteger(java.lang.String name) |
int |
getInteger(java.lang.String name,
int defaultValue) |
java.util.List<?> |
getList(GraphName name) |
java.util.List<?> |
getList(GraphName name,
java.util.List<?> defaultValue) |
java.util.List<?> |
getList(java.lang.String name) |
java.util.List<?> |
getList(java.lang.String name,
java.util.List<?> defaultValue) |
java.util.Map<?,?> |
getMap(GraphName name) |
java.util.Map<?,?> |
getMap(GraphName name,
java.util.Map<?,?> defaultValue) |
java.util.Map<?,?> |
getMap(java.lang.String name) |
java.util.Map<?,?> |
getMap(java.lang.String name,
java.util.Map<?,?> defaultValue) |
java.util.Collection<GraphName> |
getNames() |
java.lang.String |
getString(GraphName name) |
java.lang.String |
getString(GraphName name,
java.lang.String defaultValue) |
java.lang.String |
getString(java.lang.String name) |
java.lang.String |
getString(java.lang.String name,
java.lang.String defaultValue) |
boolean |
has(GraphName name) |
boolean |
has(java.lang.String name) |
GraphName |
search(GraphName name)
Search for parameter key on the Parameter Server.
|
GraphName |
search(java.lang.String name) |
void |
set(GraphName name,
boolean value) |
void |
set(GraphName name,
double value) |
void |
set(GraphName name,
int value) |
void |
set(GraphName name,
java.util.List<?> value) |
void |
set(GraphName name,
java.util.Map<?,?> value) |
void |
set(GraphName name,
java.lang.String value) |
void |
set(java.lang.String name,
boolean value) |
void |
set(java.lang.String name,
double value) |
void |
set(java.lang.String name,
int value) |
void |
set(java.lang.String name,
java.util.List<?> value) |
void |
set(java.lang.String name,
java.util.Map<?,?> value) |
void |
set(java.lang.String name,
java.lang.String value) |
boolean getBoolean(GraphName name)
name
- the parameter nameParameterNotFoundException
- if the parameter is not foundParameterClassCastException
- if the parameter is not the expected typeboolean getBoolean(java.lang.String name)
getBoolean(GraphName)
boolean getBoolean(GraphName name, boolean defaultValue)
name
- the parameter namedefaultValue
- the default valueParameterClassCastException
- if the parameter exists and is not the expected typeboolean getBoolean(java.lang.String name, boolean defaultValue)
getBoolean(GraphName, boolean)
int getInteger(GraphName name)
name
- the parameter nameParameterNotFoundException
- if the parameter is not foundParameterClassCastException
- if the parameter is not the expected typeint getInteger(java.lang.String name)
getInteger(GraphName)
int getInteger(GraphName name, int defaultValue)
name
- the parameter namedefaultValue
- the default valueParameterClassCastException
- if the parameter exists and is not the expected typeint getInteger(java.lang.String name, int defaultValue)
getInteger(GraphName, int)
double getDouble(GraphName name)
name
- the parameter nameParameterNotFoundException
- if the parameter is not foundParameterClassCastException
- if the parameter is not the expected typedouble getDouble(java.lang.String name)
getDouble(GraphName)
double getDouble(GraphName name, double defaultValue)
name
- the parameter namedefaultValue
- the default valueParameterClassCastException
- if the parameter exists and is not the expected typedouble getDouble(java.lang.String name, double defaultValue)
getDouble(GraphName, double)
java.lang.String getString(GraphName name)
name
- the parameter nameParameterNotFoundException
- if the parameter is not foundParameterClassCastException
- if the parameter is not the expected typejava.lang.String getString(java.lang.String name)
getString(GraphName)
java.lang.String getString(GraphName name, java.lang.String defaultValue)
name
- the parameter namedefaultValue
- the default valueParameterClassCastException
- if the parameter exists and is not the expected typejava.lang.String getString(java.lang.String name, java.lang.String defaultValue)
getString(GraphName, String)
java.util.List<?> getList(GraphName name)
name
- the parameter nameParameterNotFoundException
- if the parameter is not foundParameterClassCastException
- if the parameter is not the expected typejava.util.List<?> getList(java.lang.String name)
getList(GraphName)
java.util.List<?> getList(GraphName name, java.util.List<?> defaultValue)
name
- the parameter namedefaultValue
- the default valueParameterClassCastException
- if the parameter exists and is not the expected typejava.util.List<?> getList(java.lang.String name, java.util.List<?> defaultValue)
getList(GraphName, List)
java.util.Map<?,?> getMap(GraphName name)
name
- the parameter nameParameterNotFoundException
- if the parameter is not foundParameterClassCastException
- if the parameter is not the expected typejava.util.Map<?,?> getMap(java.lang.String name)
getMap(GraphName)
java.util.Map<?,?> getMap(GraphName name, java.util.Map<?,?> defaultValue)
name
- the parameter namedefaultValue
- the default valueParameterClassCastException
- if the parameter exists and is not the expected typejava.util.Map<?,?> getMap(java.lang.String name, java.util.Map<?,?> defaultValue)
getMap(GraphName, Map)
void set(GraphName name, boolean value)
name
- the parameter namevalue
- the value that the parameter will be set tovoid set(java.lang.String name, boolean value)
set(GraphName, boolean)
void set(GraphName name, int value)
name
- the parameter namevalue
- the value that the parameter will be set tovoid set(java.lang.String name, int value)
set(GraphName, int)
void set(GraphName name, double value)
name
- the parameter namevalue
- the value that the parameter will be set tovoid set(java.lang.String name, double value)
set(GraphName, double)
void set(GraphName name, java.lang.String value)
name
- the parameter namevalue
- the value that the parameter will be set tovoid set(java.lang.String name, java.lang.String value)
set(GraphName, String)
void set(GraphName name, java.util.List<?> value)
name
- the parameter namevalue
- the value that the parameter will be set tovoid set(java.lang.String name, java.util.List<?> value)
set(GraphName, List)
void set(GraphName name, java.util.Map<?,?> value)
name
- the parameter namevalue
- the value that the parameter will be set tovoid set(java.lang.String name, java.util.Map<?,?> value)
set(GraphName, Map)
boolean has(GraphName name)
name
- the parameter nametrue
if a parameter with the given name exists,
false
otherwiseboolean has(java.lang.String name)
has(GraphName)
void delete(GraphName name)
name
- the parameter namevoid delete(java.lang.String name)
delete(GraphName)
GraphName search(GraphName name)
ParameterServer
finds a matching key.name
- the parameter name to search fornull
if no matching
parameter was foundGraphName search(java.lang.String name)
search(GraphName)
java.util.Collection<GraphName> getNames()
void addParameterListener(GraphName name, ParameterListener listener)
name
- the parameter name to subscribe tolistener
- a ParameterListener
that will be called when the
subscribed parameter changesvoid addParameterListener(java.lang.String name, ParameterListener listener)