public interface DistributedProperty<T extends Serializable>
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(DistributePropertyListener<? super T> listener) |
T |
get() |
String |
getName() |
T |
getOrDefault(T dfltVal) |
boolean |
propagate(T newVal)
Change value across whole cluster.
|
GridFutureAdapter<?> |
propagateAsync(T newVal)
Change value across whole cluster.
|
GridFutureAdapter<?> |
propagateAsync(T expectedVal,
T newVal)
Change value across whole cluster.
|
boolean propagate(T newVal) throws IgniteCheckedException
newVal - Value which this property should be changed on.true if value was successfully updated and false if cluster wide update was failed,
perhaps some concurrent operation was changed this value in same moment.DetachedPropertyException - If this property have not been attached to processor yet, please call DistributedConfigurationProcessor.registerProperty(DistributedChangeableProperty) before this method.NotWritablePropertyException - If this property don't ready to cluster wide update yet, perhaps cluster is
not active yet.IgniteCheckedException - If failed during cluster wide update.GridFutureAdapter<?> propagateAsync(T newVal) throws IgniteCheckedException
newVal - Value which this property should be changed on.DetachedPropertyException - If this property have not been attached to processor yet, please call DistributedConfigurationProcessor.registerProperty(DistributedChangeableProperty) before this method.NotWritablePropertyException - If this property don't ready to cluster wide update yet, perhaps cluster is
not active yet.IgniteCheckedException - If failed during cluster wide update.GridFutureAdapter<?> propagateAsync(T expectedVal, T newVal) throws IgniteCheckedException
newVal - Value which this property should be changed on.expectedVal - Value from which this property should be changed.DetachedPropertyException - If this property have not been attached to processor yet, please call DistributedConfigurationProcessor.registerProperty(DistributedChangeableProperty) before this method.NotWritablePropertyException - If this property don't ready to cluster wide update yet, perhaps cluster is
not active yet.IgniteCheckedException - If failed during cluster wide update.T get()
T getOrDefault(T dfltVal)
dfltVal - Default value when current value is null.String getName()
void addListener(DistributePropertyListener<? super T> listener)
listener - Update listener.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.1 Release Date : December 9 2020