org.apache.ignite.internal.processors.configuration.distributed

## Interface DistributedProperty<T extends Serializable>

All Known Subinterfaces:
  DistributedChangeableProperty<T>

All Known Implementing Classes:
  DistributedBooleanProperty, DistributedComparableProperty, DistributedLongProperty, DistributedTracingConfiguration, SimpleDistributedProperty

    public interface DistributedProperty<T extends Serializable>

Public interface of distributed property usage.

### Method Summary

All Methods Instance Methods Abstract Methods
`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.

### 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:
  `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.
Throws:
  `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.

#### 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 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.

#### 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 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.

#### 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.

#### addListener

    void addListener(DistributePropertyListener<? super T> listener)

Parameters:
  `listener` - Update listener.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020