Package io.helidon.config.etcd
Class EtcdWatchPollingStrategy
- java.lang.Object
-
- io.helidon.config.etcd.EtcdWatchPollingStrategy
-
- All Implemented Interfaces:
PollingStrategy
,Supplier<PollingStrategy>
public class EtcdWatchPollingStrategy extends Object implements PollingStrategy
Etcd watch strategy is based on etcd watch operation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.helidon.config.spi.PollingStrategy
PollingStrategy.PollingEvent
-
-
Constructor Summary
Constructors Constructor Description EtcdWatchPollingStrategy(EtcdConfigSourceBuilder.EtcdEndpoint endpoint)
Creates polling strategy from etcd params.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EtcdWatchPollingStrategy
create(EtcdConfigSourceBuilder.EtcdEndpoint endpoint)
Creates polling strategy from etcd params.Flow.Publisher<PollingStrategy.PollingEvent>
ticks()
Returns aFlow.Publisher
which firesPollingStrategy.PollingEvent
s.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.config.spi.PollingStrategy
get
-
-
-
-
Constructor Detail
-
EtcdWatchPollingStrategy
public EtcdWatchPollingStrategy(EtcdConfigSourceBuilder.EtcdEndpoint endpoint)
Creates polling strategy from etcd params.- Parameters:
endpoint
- etcd remote descriptor
-
-
Method Detail
-
create
public static EtcdWatchPollingStrategy create(EtcdConfigSourceBuilder.EtcdEndpoint endpoint)
Creates polling strategy from etcd params.- Parameters:
endpoint
- etcd remote descriptor- Returns:
- configured polling strategy
-
ticks
public Flow.Publisher<PollingStrategy.PollingEvent> ticks()
Description copied from interface:PollingStrategy
Returns aFlow.Publisher
which firesPollingStrategy.PollingEvent
s.Note that
PollingStrategy
implementations can generatePollingEvent
s whether or not any subscribers have subscribed to the publisher of the events.Subscribers typically invoke
Flow.Subscription.request(long)
asking for one event initially, and then after it has processed each event the subscriber requests one more event.The subscriber might not receive every event broadcast, for example if it subscribes to the publisher after an event has been delivered to the publisher.
Each
PollingStrategy
implementation chooses which executor to use for notifying subscribers. The recommended practice is to use the same thread as the polling strategy implementation runs on.- Specified by:
ticks
in interfacePollingStrategy
- Returns:
- a publisher of events
-
-