Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AzureBlobLease

Package version

Describes the lease used with an Azure Blob for storing the checkpoint information.

Hierarchy

Implements

Index

Constructors

constructor

Properties

blob

blob: AzureBlob
property

{AzureBlob} blob Reference to the azure blob.

epoch

epoch: number
property

{number} epoch The epoch(time) of the lease, which is a value you can use to determine the most recent owner of a partition between competing nodes.

isOwned

isOwned: boolean = false
property

{boolean} isOwned Indicates wether the lease is owned. true if it is owned by someone; false otherwise.

Optional offset

offset: undefined | string
property

{string} offset The offset of the event to be checked in.

owner

owner: string
property

{string} owner The host owner for the partition.

partitionId

partitionId: string
property

{string} partitionId The associated partitionId for which the lease is held.

readonly

sequenceNumber

sequenceNumber: number
property

{string} sequenceNumber The sequence number of the event to be checked in.

token

token: string
property

{string} token The lease token that manages concurrency between hosts. You can use this token to guarantee single access to any resource needed by the EPH.

Methods

getInfo

incrementEpoch

  • incrementEpoch(): number

isOwnedBy

  • isOwnedBy(possibleOwner: string): boolean
  • Compares possibleOwner against this.owner

    Parameters

    • possibleOwner: string

      The owner name to check.

    Returns boolean

    boolean - true if possibleOwner is the same as this.owner, false otherwise.

serialize

  • serialize(): string
  • Serializes the lease information.

    Returns string

    string The serialized lease info.

Static createFromPartitionId

  • Creates a Lease for the given partitionId.

    Parameters

    • id: string

      The partitionId for which the lease needs to be created.

    • blob: AzureBlob

      The azure blob reference

    Returns AzureBlobLease

    Lease.

Generated using TypeDoc