|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.config.DynamicSetProperty<T>
public abstract class DynamicSetProperty<T>
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_DELIMITER
|
| Constructor Summary | |
|---|---|
DynamicSetProperty(java.lang.String propName,
java.util.Set<T> defaultValue)
|
|
DynamicSetProperty(java.lang.String propName,
java.util.Set<T> defaultValue,
com.google.common.base.Splitter splitter)
Create the dynamic set property using the splitter and default set value passed in from the arguments. |
|
DynamicSetProperty(java.lang.String propName,
java.util.Set<T> defaultValue,
java.lang.String delimiterRegex)
Create the dynamic set property. |
|
DynamicSetProperty(java.lang.String propName,
java.lang.String defaultValue)
Create the dynamic set property using default delimiter regex ",". |
|
DynamicSetProperty(java.lang.String propName,
java.lang.String defaultValue,
java.lang.String delimiterRegex)
Create the dynamic set 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.Set<T> |
get()
Get the set 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.Set<T> |
getDefaultValue()
Get the default property value specified at creation time |
java.lang.String |
getName()
Getter for the property name |
java.util.Set<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.Set<T> |
transform(java.util.Set<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 DynamicSetProperty(java.lang.String propName,
java.lang.String defaultValue)
Splitter.onPattern(delimiterRegex).omitEmptyStrings().trimResults(). The default
set value will be transformed from set of strings after splitting. If defaultValue string is
null, the default set value will be an empty set.
public DynamicSetProperty(java.lang.String propName,
java.lang.String defaultValue,
java.lang.String delimiterRegex)
Splitter.onPattern(delimiterRegex).omitEmptyStrings().trimResults(). The default
set value will be transformed from set of strings after splitting. If defaultValue string is
null, the default set value will be an empty set.
public DynamicSetProperty(java.lang.String propName,
java.util.Set<T> defaultValue)
public DynamicSetProperty(java.lang.String propName,
java.util.Set<T> defaultValue,
java.lang.String delimiterRegex)
Splitter.onPattern(delimiterRegex).omitEmptyStrings().trimResults(). The default
set value will be taken from the passed in set argument.
public DynamicSetProperty(java.lang.String propName,
java.util.Set<T> defaultValue,
com.google.common.base.Splitter splitter)
| Method Detail |
|---|
protected void propertyChanged()
public java.util.Set<T> get()
public java.util.Set<T> getValue()
Property
getValue in interface Property<java.util.Set<T>>public java.util.Set<T> getDefaultValue()
Property
getDefaultValue in interface Property<java.util.Set<T>>protected java.util.Set<T> transform(java.util.Set<java.lang.String> stringValues)
protected void load()
public long getChangedTimestamp()
getChangedTimestamp in interface Property<java.util.Set<T>>public void addCallback(java.lang.Runnable callback)
addCallback in interface Property<java.util.Set<T>>public void removeAllCallbacks()
removeAllCallbacks in interface Property<java.util.Set<T>>protected abstract T from(java.lang.String value)
public java.lang.String getName()
getName in interface Property<java.util.Set<T>>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||