public interface StreamManager
extends java.lang.AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the stream manager.
|
static StreamManager |
create(ClientConfig clientConfig)
Creates a new instance of StreamManager.
|
static StreamManager |
create(java.net.URI controller)
Creates a new instance of StreamManager.
|
boolean |
createScope(java.lang.String scopeName)
Creates a new scope.
|
boolean |
createStream(java.lang.String scopeName,
java.lang.String streamName,
StreamConfiguration config)
Creates a new stream
|
boolean |
deleteScope(java.lang.String scopeName)
Deletes an existing scope.
|
boolean |
deleteStream(java.lang.String scopeName,
java.lang.String toDelete)
Deletes the provided stream.
|
boolean |
sealStream(java.lang.String scopeName,
java.lang.String streamName)
Seal an existing stream.
|
boolean |
truncateStream(java.lang.String scopeName,
java.lang.String streamName,
StreamCut streamCut)
Truncate stream at given stream cut.
|
boolean |
updateStream(java.lang.String scopeName,
java.lang.String streamName,
StreamConfiguration config)
Change the configuration for an existing stream.
|
static StreamManager create(java.net.URI controller)
controller
- The Controller URI.static StreamManager create(ClientConfig clientConfig)
clientConfig
- Configuration for the client connection to Pravega.boolean createStream(java.lang.String scopeName, java.lang.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(java.lang.String scopeName, java.lang.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 truncateStream(java.lang.String scopeName, java.lang.String streamName, StreamCut streamCut)
scopeName
- The name of the scope to create this stream in.streamName
- The name of the stream who's config is to be changed.streamCut
- The stream cut to truncate at.boolean sealStream(java.lang.String scopeName, java.lang.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(java.lang.String scopeName, java.lang.String toDelete)
scopeName
- The name of the scope to create this stream in.toDelete
- The name of the stream to be deleted.boolean createScope(java.lang.String scopeName)
scopeName
- The name of the scope to create this stream in.boolean deleteScope(java.lang.String scopeName)
scopeName
- The name of the scope to create this stream in.void close()
close
in interface java.lang.AutoCloseable
AutoCloseable.close()