PartitionsCreatorFactory

PartitionsCreatorFactory must be implemented by each source connector and serves as the entrypoint to how READ operations are executed for that connector, via the PartitionsCreator and PartitionReader instances which are ultimately created by it.

Types

Link copied to clipboard
sealed interface TryAcquireResourcesResult

Functions

Link copied to clipboard
abstract fun make(feedBootstrap: FeedBootstrap<*>): PartitionsCreator?

Returns a PartitionsCreator which will cause the READ to advance for the Feed for which the FeedBootstrap argument is associated to. The latter exposes methods to obtain the current OpaqueStateValue for this feed but also to peek at the state of other Feeds. This may be useful for synchronizing the READ for this feed by waiting for other Feeds to reach a desired state before proceeding; the waiting may be triggered by PartitionsCreator.tryAcquireResources or PartitionReader.tryAcquireResources.

Link copied to clipboard

Default implementation is a no-op as most connectors do not require any resource for their PartitionsCreatorFactory. Postgres connector being the exception.