public interface StreamManager extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the stream manager.
|
static StreamManager |
create(URI controller)
Creates a new instance of StreamManager.
|
boolean |
createScope(String scopeName)
Creates a new scope.
|
boolean |
createStream(String scopeName,
String streamName,
StreamConfiguration config)
Creates a new stream
|
boolean |
deleteScope(String scopeName)
Deletes an existing scope.
|
boolean |
deleteStream(String scopeName,
String toDelete)
Deletes the provided stream.
|
boolean |
sealStream(String scopeName,
String streamName)
Seal an existing stream.
|
boolean |
updateStream(String scopeName,
String streamName,
StreamConfiguration config)
Change the configuration for an existing stream.
|
static StreamManager create(URI controller)
controller
- The Controller URI.boolean createStream(String scopeName, String streamName, StreamConfiguration config)
Note: This method is idempotent assuming called with the same name and config. This method may block.
scopeName
- The name of the scope to create this stream in.streamName
- The name of the stream to be created.config
- The configuration the stream should use.boolean updateStream(String scopeName, String streamName, StreamConfiguration config)
Note: This method is idempotent assuming called with the same name and config. This method may block.
scopeName
- The name of the scope to create this stream in.streamName
- The name of the stream who's config is to be changed.config
- The new configuration.boolean sealStream(String scopeName, String streamName)
scopeName
- The name of the scope to create this stream in.streamName
- The name of the stream which has to be sealed.boolean deleteStream(String scopeName, String toDelete)
scopeName
- The name of the scope to create this stream in.toDelete
- The name of the stream to be deleted.boolean createScope(String scopeName)
scopeName
- The name of the scope to create this stream in.boolean deleteScope(String scopeName)
scopeName
- The name of the scope to create this stream in.void close()
close
in interface AutoCloseable
AutoCloseable.close()