Interface StreamFactory

    • Method Detail

      • create

        <T> ErrorStreamPair<T> create​(StreamId<T> id,
                                      DiscoveryService discoveryService)
        Given an implementation of StreamId and a DiscoveryService this method creates a Publisher. The provided DiscoveryService can be used to discover other streams that are needed in the creation process (stream combination, transformation, etc.)

        NOTE: it is strongly discouraged the use of multiple threads inside this method (see TypedStreamFactory documentation).

        Parameters:
        id - the id of the stream to create
        discoveryService - DiscoveryService which can be used by the factory to look up other streams ('upstream' of the one it will create)
        Returns:
        the newly created stream or null if this factory cannot create the stream of the given id