Lease Class

Lease contains partition processing state metadata used to manage partition state.

Inheritance
builtins.object
Lease

Constructor

Lease()

Methods

increment_epoch

Increment lease epoch.

is_expired

Determines whether the lease is expired. By default lease never expires. Deriving class implements the lease expiry logic.

with_partition_id

Init with partition Id.

with_source

Init with existing lease.

increment_epoch

Increment lease epoch.

increment_epoch()

is_expired

Determines whether the lease is expired. By default lease never expires. Deriving class implements the lease expiry logic.

async is_expired()

Return type

with_partition_id

Init with partition Id.

with_partition_id(partition_id)

Parameters

partition_id
str
Required

ID of a given partition.

with_source

Init with existing lease.

with_source(lease)

Parameters

lease
Lease
Required

An existing Lease.