Class TrackKeepingDiscoveryService
- java.lang.Object
-
- org.streamingpool.core.service.impl.TrackKeepingDiscoveryService
-
- All Implemented Interfaces:
DiscoveryService
public class TrackKeepingDiscoveryService extends java.lang.Object implements DiscoveryService
Special implementation of aDiscoveryService. It is able to discover streams recursively while preventing cycles. Also, it is able to detect recursive discoveries from multiple threads, which is not allowed.
-
-
Constructor Summary
Constructors Constructor Description TrackKeepingDiscoveryService(java.util.List<StreamFactory> factories, PoolContent content, PoolConfiguration poolConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> org.reactivestreams.Publisher<T>discover(StreamId<T> id)Given aStreamId, this method returns the correspondentPublisher.
-
-
-
Constructor Detail
-
TrackKeepingDiscoveryService
public TrackKeepingDiscoveryService(java.util.List<StreamFactory> factories, PoolContent content, PoolConfiguration poolConfiguration)
-
-
Method Detail
-
discover
public <T> org.reactivestreams.Publisher<T> discover(StreamId<T> id)
Description copied from interface:DiscoveryServiceGiven aStreamId, this method returns the correspondentPublisher. This method should not return null, instead is preferred to throw a specific exception in the case the given id is not present in the system. From the API level, this behavior is not forced.- Specified by:
discoverin interfaceDiscoveryService- Parameters:
id- the identifier of the stream to be discovered- Returns:
- the discovered
Publisher
-
-