Interface ByteStreamClientFactory

  • All Superinterfaces:
    java.lang.AutoCloseable
    All Known Implementing Classes:
    ByteStreamClientImpl

    @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 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 interface java.lang.AutoCloseable
        See Also:
        AutoCloseable.close()