Partition

class PartitionService(client)

Bases: object

An SPI service for accessing partition related information.

logger = <Logger HazelcastClient.PartitionService (WARNING)>
timer = None
start()

Starts the partition service.

shutdown()

Shutdowns the partition service.

refresh()

Refreshes the partition service.

get_partition_owner(partition_id)

Gets the owner of the partition if it’s set. Otherwise it will trigger partition assignment.

Parameters

partition_id – (int), the partition id.

Returns

(Address), owner of partition or None if it’s not set yet.

get_partition_id(key)

Returns the partition id for a Data key.

Parameters

key – (object), the data key.

Returns

(int), the partition id.

get_partition_count()

Returns the number of partitions.

Returns

(int), the number of partitions.

process_partition_response(message)
string_partition_strategy(key)