|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.config.DynamicListProperty<T>
public abstract class DynamicListProperty<T>
This class delegates to a regex (default is comma) delimited dynamic string property and returns a dynamic list of a generic type which is transformed from string.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_DELIMITER
|
| Constructor Summary | |
|---|---|
DynamicListProperty(java.lang.String propName,
java.util.List<T> defaultValue)
|
|
DynamicListProperty(java.lang.String propName,
java.util.List<T> defaultValue,
com.google.common.base.Splitter splitter)
Create the dynamic list property using the splitter and default list value passed in from the arguments. |
|
DynamicListProperty(java.lang.String propName,
java.util.List<T> defaultValue,
java.lang.String delimiterRegex)
Create the dynamic list property. |
|
DynamicListProperty(java.lang.String propName,
java.lang.String defaultValue)
Create the dynamic list property using default delimiter regex ",". |
|
DynamicListProperty(java.lang.String propName,
java.lang.String defaultValue,
java.lang.String delimiterRegex)
Create the dynamic list property. |
|
| Method Summary | |
|---|---|
void |
addCallback(java.lang.Runnable callback)
Add the callback to be triggered when the value of the property is changed |
protected abstract T |
from(java.lang.String value)
Construct the generic type from string. |
java.util.List<T> |
get()
Get the list type from the underlying dynamic string property. |
long |
getChangedTimestamp()
Gets the time (in milliseconds past the epoch) when the property was last set/changed. |
java.util.List<T> |
getDefaultValue()
Get the default property value specified at creation time |
java.lang.String |
getName()
Getter for the property name |
java.util.List<T> |
getValue()
Get the latest value for the given property |
protected void |
load()
|
protected void |
propertyChanged()
A method invoked when the underlying string property is changed. |
void |
removeAllCallbacks()
Remove all callbacks registered through this instance of property |
protected java.util.List<T> |
transform(java.util.List<java.lang.String> stringValues)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_DELIMITER
| Constructor Detail |
|---|
public DynamicListProperty(java.lang.String propName,
java.lang.String defaultValue)
Splitter.onPattern(delimiterRegex).omitEmptyStrings().trimResults(). The default
list value will be transformed from list of strings after splitting. If defaultValue string is
null, the default list value will be an empty list.
public DynamicListProperty(java.lang.String propName,
java.lang.String defaultValue,
java.lang.String delimiterRegex)
Splitter.onPattern(delimiterRegex).omitEmptyStrings().trimResults(). The default
list value will be transformed from list of strings after splitting. If defaultValue string is
null, the default list value will be an empty list.
public DynamicListProperty(java.lang.String propName,
java.util.List<T> defaultValue)
public DynamicListProperty(java.lang.String propName,
java.util.List<T> defaultValue,
java.lang.String delimiterRegex)
Splitter.onPattern(delimiterRegex).omitEmptyStrings().trimResults(). The default
list value will be taken from the passed in list argument.
public DynamicListProperty(java.lang.String propName,
java.util.List<T> defaultValue,
com.google.common.base.Splitter splitter)
| Method Detail |
|---|
protected void propertyChanged()
public java.util.List<T> get()
public java.util.List<T> getValue()
Property
getValue in interface Property<java.util.List<T>>public java.util.List<T> getDefaultValue()
Property
getDefaultValue in interface Property<java.util.List<T>>protected java.util.List<T> transform(java.util.List<java.lang.String> stringValues)
protected void load()
public long getChangedTimestamp()
getChangedTimestamp in interface Property<java.util.List<T>>public void addCallback(java.lang.Runnable callback)
addCallback in interface Property<java.util.List<T>>public void removeAllCallbacks()
removeAllCallbacks in interface Property<java.util.List<T>>protected abstract T from(java.lang.String value)
public java.lang.String getName()
getName in interface Property<java.util.List<T>>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||