Used to create, delete, and manage Streams, ReaderGroups, and Writers.

Hierarchy

  • StreamManager

Properties

create_reader_group: ((stream_cut: StreamCut, reader_group_name: string, scope_name: string, ...streams: string[]) => StreamReaderGroup)

Type declaration

    • (stream_cut: StreamCut, reader_group_name: string, scope_name: string, ...streams: string[]): StreamReaderGroup
    • Create a ReaderGroup for a given Stream.

      Returns

      A StreamReaderGroup.

      Todo

      An optional element cannot follow a rest element. ...args: [...stream: string[], stream_cut?: StreamCut]

      Parameters

      • stream_cut: StreamCut

        The offset you would like to read from.

      • reader_group_name: string

        The reader group name.

      • scope_name: string

        The scope name.

      • Rest ...streams: string[]

        All stream names in this scope.

      Returns StreamReaderGroup

create_scope: ((scope_name: string) => boolean)

Type declaration

    • (scope_name: string): boolean
    • Create a Pravega scope.

      Returns

      The scope creation result. false indicates that the scope exists before creation.

      Parameters

      • scope_name: string

        The scope name.

      Returns boolean

create_stream: ((scope_name: string, stream_name: string, retention_policy?: StreamRetentionPolicy, scaling_policy?: StreamScalingPolicy, tags?: string[]) => boolean)

Type declaration

    • (scope_name: string, stream_name: string, retention_policy?: StreamRetentionPolicy, scaling_policy?: StreamScalingPolicy, tags?: string[]): boolean
    • Create a stream with or without specific policy in Pravega.

      Returns

      The stream creation result. false indicates that the stream exists before creation.

      Parameters

      • scope_name: string

        The scope name.

      • stream_name: string

        The stream name.

      • Optional retention_policy: StreamRetentionPolicy

        The retention policy. Default will be StreamRetentionPolicy.none()

      • Optional scaling_policy: StreamScalingPolicy

        The scaling policy. Default will be StreamScalingPolicy.fixed_scaling_policy(1)

      • Optional tags: string[]

        The stream tags.

      Returns boolean

create_transaction_writer: ((scope_name: string, stream_name: string, writer_id: BigInt) => StreamTxnWriter)

Type declaration

    • (scope_name: string, stream_name: string, writer_id: BigInt): StreamTxnWriter
    • Create a transaction Writer for a given Stream.

      Returns

      A StreamTxnWriter.

      Parameters

      • scope_name: string

        The scope name.

      • stream_name: string

        The stream name.

      • writer_id: BigInt

        ID (no larger than unsigned int 128) of the writer.

      Returns StreamTxnWriter

create_writer: ((scope_name: string, stream_name: string) => StreamWriter)

Type declaration

    • (scope_name: string, stream_name: string): StreamWriter
    • Create a Writer for a given Stream.

      Returns

      A StreamWriter.

      Parameters

      • scope_name: string

        The scope name.

      • stream_name: string

        The stream name.

      Returns StreamWriter

delete_reader_group: ((scope_name: string, reader_group_name: string) => void)

Type declaration

    • (scope_name: string, reader_group_name: string): void
    • Delete a ReaderGroup for a given Stream.

      Parameters

      • scope_name: string

        The scope name.

      • reader_group_name: string

        The reader group name.

      Returns void

delete_scope: ((scope_name: string) => boolean)

Type declaration

    • (scope_name: string): boolean
    • Delete a Pravega scope.

      Returns

      The scope deletion result. false indicates that the scope does not exist before deletion.

      Parameters

      • scope_name: string

        The scope name.

      Returns boolean

delete_stream: ((scope_name: string, stream_name: string) => boolean)

Type declaration

    • (scope_name: string, stream_name: string): boolean
    • Deleta a Pravega stream. SEAL BEFORE DELETE!

      Returns

      The deletion result.

      Parameters

      • scope_name: string

        The scope name.

      • stream_name: string

        The stream name.

      Returns boolean

get_stream_tags: ((scope_name: string, stream_name: string) => string[])

Type declaration

    • (scope_name: string, stream_name: string): string[]
    • Get tags of a Pravega stream.

      Returns

      The stream tags.

      Parameters

      • scope_name: string

        The scope name.

      • stream_name: string

        The stream name.

      Returns string[]

list_scopes: (() => Promise<string[]>)

Type declaration

    • (): Promise<string[]>
    • List all scopes in Pravega.

      Returns

      Scope names in Promise.

      Returns Promise<string[]>

list_streams: ((scope_name: string) => Promise<string[]>)

Type declaration

    • (scope_name: string): Promise<string[]>
    • List all streams in the specified Pravega scope.

      Returns

      Stream names in Promise.

      Parameters

      • scope_name: string

        The scope name.

      Returns Promise<string[]>

seal_stream: ((scope_name: string, stream_name: string) => boolean)

Type declaration

    • (scope_name: string, stream_name: string): boolean
    • Seal a Pravega stream. SEAL BEFORE DELETE!

      Returns

      The seal result.

      Parameters

      • scope_name: string

        The scope name.

      • stream_name: string

        The stream name.

      Returns boolean

toString: (() => string)

Type declaration

    • (): string
    • A detailed view of the StreamManager.

      Returns

      String representation of the StreamManager.

      Returns string

update_stream: ((scope_name: string, stream_name: string, retention_policy?: StreamRetentionPolicy, scaling_policy?: StreamScalingPolicy, tags?: string[]) => boolean)

Type declaration

    • (scope_name: string, stream_name: string, retention_policy?: StreamRetentionPolicy, scaling_policy?: StreamScalingPolicy, tags?: string[]): boolean
    • Update a Pravega stream with new policies and tags.

      Returns

      The stream update result.

      Parameters

      • scope_name: string

        The scope name.

      • stream_name: string

        The stream name.

      • Optional retention_policy: StreamRetentionPolicy

        The retention policy. Default will be StreamRetentionPolicy.none()

      • Optional scaling_policy: StreamScalingPolicy

        The scaling policy. Default will be StreamScalingPolicy.fixed_scaling_policy(1)

      • Optional tags: string[]

        The stream tags.

      Returns boolean

Generated using TypeDoc