Interface ISourceConfig<I,​E>

  • Type Parameters:
    I - type of the identifiers of messages.
    E - type of the data elements appended into message chunks.
    All Known Subinterfaces:
    ICsvSourceConfig<I>, IJdbcSourceConfig
    All Known Implementing Classes:
    SimpleCsvSourceConfig, SimpleJdbcSourceConfig, SimpleSourceConfig

    public interface ISourceConfig<I,​E>
    Extension of ISource for use with the data load controller. Along with the source object, it can create message channels for registration with the data load controller. This source and channels can be registered with the data load controller as follows:
     IScopedFetchSource<I, E> source = sourceConfig.getSource();
     controller.registerSource(source);
     for (String topic: source.getTopics()) {
       IMessageChannel<I, E> channel = sourceConfig.createChannel(topic);
       controller.registerChannel(sourceConfig.createChannel(topic), sourceConfig.getTargetStores(topic), getConditionConverter(topic));
     }
     
    • Method Detail

      • getSource

        com.activeviam.tools.dataloadcontroller.core.source.IFetchingDataSource<I,​E> getSource()
        Returns:
        the source object that can be registered with IDataLoadController
      • getTargetStores

        Collection<String> getTargetStores​(String topic)
        The stores that are targeted by the topic. These stores are passed to the IDataLoadController.registerChannel() when registering the topic's channel with the data load controller.
        Parameters:
        topic - the topic whose target stores are
        Returns:
        the stores that may be written to when fetching the topic
        See Also:
        ITuplePublisher.getTargetStores()
      • createChannel

        com.qfs.msg.IMessageChannel<I,​E> createChannel​(String topic)
        Create a message channel for the topic.
        Parameters:
        topic - the topic to create the channel for
        Returns:
        the message channel