Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PartitionService

Partition service for Hazelcast clients. Allows to retrieve information about the partition count, the partition owner or the partitionId of a key.

Hierarchy

  • PartitionService

Index

Methods

getPartitionCount

  • getPartitionCount(): number
  • Returns partition count of the connected cluster. If partition table is not fetched yet, this method returns 0.

    Returns number

    the partition count

getPartitionId

  • getPartitionId(key: any): number
  • Computes the partition id for a given key.

    throws

    ClientOfflineError if the partition table has not arrived yet.

    Parameters

    • key: any

    Returns number

    the partition id.

getPartitionOwner

  • getPartitionOwner(partitionId: number): UUID
  • Returns UUID of owner member for a given partition id.

    Parameters

    • partitionId: number

      partition id

    Returns UUID

    UUID of the owner of the partition or undefined if a partition is not assigned yet

Generated using TypeDoc