Package io.pravega.client
Interface ByteStreamClientFactory
-
- All Superinterfaces:
java.lang.AutoCloseable
@Beta public interface ByteStreamClientFactory extends java.lang.AutoCloseable
Used to create Writers and Readers operating on a Byte Stream. The byteStreamClient can create readers and writers that work on a stream of bytes. The stream must be pre-created with a single fixed segment. Sharing a stream between the byte stream API and the Event stream readers/writers will CORRUPT YOUR DATA in an unrecoverable way.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes the ByteStreamClientFactory.ByteStreamReader
createByteStreamReader(java.lang.String streamName)
Creates a new ByteStreamReader on the specified stream initialized to offset 0.ByteStreamWriter
createByteStreamWriter(java.lang.String streamName)
Creates a new ByteStreamWriter on the specified stream.static ByteStreamClientFactory
withScope(java.lang.String scope, ClientConfig config)
Creates a new instance of ByteStreamClientFactory.
-
-
-
Method Detail
-
withScope
static ByteStreamClientFactory withScope(java.lang.String scope, ClientConfig config)
Creates a new instance of ByteStreamClientFactory.- Parameters:
scope
- The scope string.config
- Configuration for the client.- Returns:
- Instance of ByteStreamClientFactory implementation.
-
createByteStreamReader
@Beta ByteStreamReader createByteStreamReader(java.lang.String streamName)
Creates a new ByteStreamReader on the specified stream initialized to offset 0.- Parameters:
streamName
- the stream to read from.- Returns:
- A new ByteStreamReader
-
createByteStreamWriter
@Beta ByteStreamWriter createByteStreamWriter(java.lang.String streamName)
Creates a new ByteStreamWriter on the specified stream.- Parameters:
streamName
- The name of the stream to write to.- Returns:
- A new ByteStreamWriter.
-
close
void close()
Closes the ByteStreamClientFactory. This will close any connections created through it.- Specified by:
close
in interfacejava.lang.AutoCloseable
- See Also:
AutoCloseable.close()
-
-