Class ByteStreamClientImpl
- java.lang.Object
-
- io.pravega.client.byteStream.impl.ByteStreamClientImpl
-
- All Implemented Interfaces:
ByteStreamClientFactory,java.lang.AutoCloseable
public class ByteStreamClientImpl extends java.lang.Object implements ByteStreamClientFactory
Implementation forByteStreamClientFactory. Note: Ownership of all constructor arguments is assumed to be passed to this implementation.
-
-
Constructor Summary
Constructors Constructor Description ByteStreamClientImpl(@NonNull java.lang.String scope, @NonNull Controller controller, @NonNull ConnectionPool connectionPool, @NonNull SegmentInputStreamFactory inputStreamFactory, @NonNull SegmentOutputStreamFactory outputStreamFactory, @NonNull SegmentMetadataClientFactory metaStreamFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the ByteStreamClientFactory.ByteStreamReadercreateByteStreamReader(java.lang.String streamName)Creates a new ByteStreamReader on the specified stream initialized to offset 0.ByteStreamWritercreateByteStreamWriter(java.lang.String streamName)Creates a new ByteStreamWriter on the specified stream.
-
-
-
Constructor Detail
-
ByteStreamClientImpl
@ConstructorProperties({"scope","controller","connectionPool","inputStreamFactory","outputStreamFactory","metaStreamFactory"}) public ByteStreamClientImpl(@NonNull @NonNull java.lang.String scope, @NonNull @NonNull Controller controller, @NonNull @NonNull ConnectionPool connectionPool, @NonNull @NonNull SegmentInputStreamFactory inputStreamFactory, @NonNull @NonNull SegmentOutputStreamFactory outputStreamFactory, @NonNull @NonNull SegmentMetadataClientFactory metaStreamFactory)
-
-
Method Detail
-
createByteStreamReader
public ByteStreamReader createByteStreamReader(java.lang.String streamName)
Description copied from interface:ByteStreamClientFactoryCreates a new ByteStreamReader on the specified stream initialized to offset 0.- Specified by:
createByteStreamReaderin interfaceByteStreamClientFactory- Parameters:
streamName- the stream to read from.- Returns:
- A new ByteStreamReader
-
createByteStreamWriter
public ByteStreamWriter createByteStreamWriter(java.lang.String streamName)
Description copied from interface:ByteStreamClientFactoryCreates a new ByteStreamWriter on the specified stream.- Specified by:
createByteStreamWriterin interfaceByteStreamClientFactory- Parameters:
streamName- The name of the stream to write to.- Returns:
- A new ByteStreamWriter.
-
close
public void close()
Description copied from interface:ByteStreamClientFactoryCloses the ByteStreamClientFactory. This will close any connections created through it.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceByteStreamClientFactory- See Also:
AutoCloseable.close()
-
-