Interface DistributedProperty<T extends Serializable>
-
- All Known Subinterfaces:
DistributedChangeableProperty<T>
- All Known Implementing Classes:
DistributedBooleanProperty,DistributedComparableProperty,DistributedDoubleProperty,DistributedEnumProperty,DistributedIntegerProperty,DistributedLongProperty,DistributedTracingConfiguration,SimpleDistributedProperty
public interface DistributedProperty<T extends Serializable>Public interface of distributed property usage.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListener(DistributePropertyListener<? super T> listener)Stringdescription()Tget()StringgetName()TgetOrDefault(T dfltVal)booleanpropagate(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.
-
-
-
Method Detail
-
propagate
boolean propagate(T newVal) throws IgniteCheckedException
Change value across whole cluster.- Parameters:
newVal- Value which this property should be changed on.- Returns:
trueif value was successfully updated andfalseif cluster wide update was failed, perhaps some concurrent operation was changed this value in same moment.- Throws:
DetachedPropertyException- If this property have not been attached to processor yet, please callDistributedConfigurationProcessor.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.
-
propagateAsync
GridFutureAdapter<?> propagateAsync(T newVal) throws IgniteCheckedException
Change value across whole cluster.- Parameters:
newVal- Value which this property should be changed on.- Returns:
- Future for update operation.
- Throws:
DetachedPropertyException- If this property have not been attached to processor yet, please callDistributedConfigurationProcessor.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.
-
propagateAsync
GridFutureAdapter<?> propagateAsync(T expectedVal, T newVal) throws IgniteCheckedException
Change value across whole cluster.- Parameters:
newVal- Value which this property should be changed on.expectedVal- Value from which this property should be changed.- Returns:
- Future for update operation.
- Throws:
DetachedPropertyException- If this property have not been attached to processor yet, please callDistributedConfigurationProcessor.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.
-
get
T get()
- Returns:
- Current property value.
-
getOrDefault
T getOrDefault(T dfltVal)
- Parameters:
dfltVal- Default value when current value is null.- Returns:
- Current property value.
-
getName
String getName()
- Returns:
- Name of property.
-
description
String description()
- Returns:
- Property description.
-
addListener
void addListener(DistributePropertyListener<? super T> listener)
- Parameters:
listener- Update listener.
-
-