public class TrackKeepingDiscoveryService extends java.lang.Object implements DiscoveryService
DiscoveryService. 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 and Description |
|---|
TrackKeepingDiscoveryService(java.util.List<StreamFactory> factories,
PoolContent content) |
TrackKeepingDiscoveryService(java.util.List<StreamFactory> factories,
PoolContent content,
java.util.Set<StreamId<?>> idsOfStreamsUnderCreation,
java.lang.Thread contextOfExecution) |
| Modifier and Type | Method and Description |
|---|---|
<T> org.reactivestreams.Publisher<T> |
discover(StreamId<T> id)
Given a
StreamId, this method returns the correspondent Publisher. |
public TrackKeepingDiscoveryService(java.util.List<StreamFactory> factories, PoolContent content)
public TrackKeepingDiscoveryService(java.util.List<StreamFactory> factories, PoolContent content, java.util.Set<StreamId<?>> idsOfStreamsUnderCreation, java.lang.Thread contextOfExecution)
public <T> org.reactivestreams.Publisher<T> discover(StreamId<T> id)
DiscoveryServiceStreamId, this method returns the correspondent Publisher. 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.discover in interface DiscoveryServiceid - the identifier of the stream to be discoveredPublisher