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.
|
StreamInfo |
getStreamInfo(java.lang.String scopeName,
java.lang.String streamName)
Get information about a given Stream,
StreamInfo. |
java.util.Iterator<Stream> |
listStreams(java.lang.String scopeName)
Gets an iterator for all streams in scope.
|
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.java.util.Iterator<Stream> listStreams(java.lang.String scopeName)
scopeName - The name of the scope for which to list streams in.boolean deleteScope(java.lang.String scopeName)
scopeName - The name of the scope to create this stream in.@Beta StreamInfo getStreamInfo(java.lang.String scopeName, java.lang.String streamName)
StreamInfo.
This includes StreamCuts pointing to the current HEAD and TAIL of the Stream.scopeName - The scope of the stream.streamName - The stream name.void close()
close in interface java.lang.AutoCloseableAutoCloseable.close()