Package io.pravega.client.admin.impl
Class ReaderGroupManagerImpl
- java.lang.Object
-
- io.pravega.client.admin.impl.ReaderGroupManagerImpl
-
- All Implemented Interfaces:
ReaderGroupManager,java.lang.AutoCloseable
public class ReaderGroupManagerImpl extends java.lang.Object implements ReaderGroupManager
A stream manager. Used to bootstrap the client.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReaderGroupManagerImpl.ReaderGroupStateInitSerializerstatic classReaderGroupManagerImpl.ReaderGroupStateUpdatesSerializer
-
Constructor Summary
Constructors Constructor Description ReaderGroupManagerImpl(java.lang.String scope, ClientConfig config, ConnectionFactory connectionFactory)ReaderGroupManagerImpl(java.lang.String scope, Controller controller, AbstractClientFactoryImpl clientFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close this manager class.booleancreateReaderGroup(java.lang.String groupName, ReaderGroupConfig config)Creates a new ReaderGroup.voiddeleteReaderGroup(java.lang.String groupName)Deletes a reader group, removing any state associated with it.ReaderGroupgetReaderGroup(java.lang.String groupName)Returns the requested reader group.
-
-
-
Constructor Detail
-
ReaderGroupManagerImpl
public ReaderGroupManagerImpl(java.lang.String scope, ClientConfig config, ConnectionFactory connectionFactory)
-
ReaderGroupManagerImpl
public ReaderGroupManagerImpl(java.lang.String scope, Controller controller, AbstractClientFactoryImpl clientFactory)
-
-
Method Detail
-
createReaderGroup
public boolean createReaderGroup(java.lang.String groupName, ReaderGroupConfig config) throws ConfigMismatchExceptionDescription copied from interface:ReaderGroupManagerCreates a new ReaderGroup. Readers will be able to join the group by callingEventStreamClientFactory.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.
- Specified by:
createReaderGroupin interfaceReaderGroupManager- Parameters:
groupName- The name of the group to be created.config- The configuration for the new ReaderGroup.- Returns:
- True if ReaderGroup was created.
- Throws:
ConfigMismatchException- If the reader group already exists with a different configuration. UseReaderGroup.resetReaderGroup(io.pravega.client.stream.ReaderGroupConfig)to change the reader group configuration.
-
deleteReaderGroup
public void deleteReaderGroup(java.lang.String groupName)
Description copied from interface:ReaderGroupManagerDeletes a reader group, removing any state associated with it. There should be no reader left on the group when this is called. If there are any, the group will be deleted from underneath them and they will encounter exceptions.- Specified by:
deleteReaderGroupin interfaceReaderGroupManager- Parameters:
groupName- The group to be deleted.
-
getReaderGroup
public ReaderGroup getReaderGroup(java.lang.String groupName) throws ReaderGroupNotFoundException
Description copied from interface:ReaderGroupManagerReturns the requested reader group.- Specified by:
getReaderGroupin interfaceReaderGroupManager- Parameters:
groupName- The name of the group- Returns:
- Reader group with the given name
- Throws:
ReaderGroupNotFoundException- If the reader group does not exist.
-
close
public void close()
Description copied from interface:ReaderGroupManagerClose this manager class. This will close any connections created through it.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceReaderGroupManager- See Also:
AutoCloseable.close()
-
-