类 NoOpSentinelProperty
java.lang.Object
com.alibaba.csp.sentinel.property.NoOpSentinelProperty
- 所有已实现的接口:
SentinelProperty<Object>
A
SentinelProperty that will never inform the PropertyListener on it.- 作者:
- leyou
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddListener(PropertyListener<Object> listener) Add aPropertyListenerto thisSentinelProperty.voidremoveListener(PropertyListener<Object> listener) Remove thePropertyListeneron this.booleanupdateValue(Object newValue) Update thenewValueas the current value of this property and inform allPropertyListeners added on this only when newnewValueis not Equals to the old value.
-
构造器详细资料
-
NoOpSentinelProperty
public NoOpSentinelProperty()
-
-
方法详细资料
-
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<Object>- 参数:
listener- listener to add.
-
removeListener
从接口复制的说明:SentinelPropertyRemove thePropertyListeneron this. After removing,SentinelProperty.updateValue(Object)will not inform the listener.- 指定者:
removeListener在接口中SentinelProperty<Object>- 参数:
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<Object>- 参数:
newValue- the new value.- 返回:
- true if the value in property has been updated, otherwise false
-