public interface ReaderGroupManager extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this manager class.
|
ReaderGroup |
createReaderGroup(String groupName,
ReaderGroupConfig config,
Set<String> streamNames)
Creates a new ReaderGroup
Readers will be able to join the group by calling
ClientFactory.createReader(String, String, Serializer, ReaderConfig)
. |
void |
deleteReaderGroup(String groupName)
Deletes a reader group, removing any state associated with it.
|
ReaderGroup |
getReaderGroup(String groupName)
Returns the requested reader group.
|
static ReaderGroupManager |
withScope(String scope,
URI controllerUri)
Creates a new instance of StreamManager.
|
static ReaderGroupManager withScope(String scope, URI controllerUri)
scope
- The Scope string.controllerUri
- The Controller URI.ReaderGroup createReaderGroup(String groupName, ReaderGroupConfig config, Set<String> streamNames)
ClientFactory.createReader(String, String, Serializer, ReaderConfig)
. Once this is done they will start receiving events from the point defined in the config
passed here.
Note: This method is idempotent assuming called with the same name and config. This method may block.
groupName
- The name of the group to be created.config
- The configuration for the new ReaderGroup.streamNames
- The name of the streams the reader will read from.void deleteReaderGroup(String groupName)
groupName
- The group to be deleted.ReaderGroup getReaderGroup(String groupName)
groupName
- The name of the groupvoid close()
close
in interface AutoCloseable
AutoCloseable.close()