类 DynamicSentinelProperty<T>
java.lang.Object
com.alibaba.csp.sentinel.property.DynamicSentinelProperty<T>
- 所有已实现的接口:
SentinelProperty<T>
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddListener(PropertyListener<T> listener) Add aPropertyListenerto thisSentinelProperty.voidclose()voidremoveListener(PropertyListener<T> listener) Remove thePropertyListeneron this.booleanupdateValue(T newValue) Update thenewValueas the current value of this property and inform allPropertyListeners added on this only when newnewValueis not Equals to the old value.
-
字段详细资料
-
listeners
-
-
构造器详细资料
-
DynamicSentinelProperty
public DynamicSentinelProperty() -
DynamicSentinelProperty
-
-
方法详细资料
-
addListener
从接口复制的说明:SentinelPropertyAdd a
PropertyListenerto thisSentinelProperty. After the listener is added,SentinelProperty.updateValue(Object)will inform the listener if needed.This method can invoke multi times to add more than one listeners.
- 指定者:
addListener在接口中SentinelProperty<T>- 参数:
listener- listener to add.
-
removeListener
从接口复制的说明:SentinelPropertyRemove thePropertyListeneron this. After removing,SentinelProperty.updateValue(Object)will not inform the listener.- 指定者:
removeListener在接口中SentinelProperty<T>- 参数:
listener- the listener to remove.
-
updateValue
从接口复制的说明:SentinelPropertyUpdate thenewValueas the current value of this property and inform allPropertyListeners added on this only when newnewValueis not Equals to the old value.- 指定者:
updateValue在接口中SentinelProperty<T>- 参数:
newValue- the new value.- 返回:
- true if the value in property has been updated, otherwise false
-
close
public void close()
-