faust.tables.objects¶
Storing objects in tables.
This is also used to store data structures such as sets/lists.
- class faust.tables.objects.ChangeloggedObject(manager: ChangeloggedObjectManager, key: Any)[source]¶
A changelogged object in a
ChangeloggedObjectManagerstore.- manager: ChangeloggedObjectManager¶
- class faust.tables.objects.ChangeloggedObjectManager(table: Table, **kwargs: Any)[source]¶
Store of changelogged objects.
- ValueType: ClassVar[Type[ChangeloggedObject]]¶
- data: MutableMapping¶
- send_changelog_event(key: Any, operation: int, value: Any) None[source]¶
Send changelog event to the tables changelog topic.
- Return type:
None
- persisted_offset(tp: TP) Optional[int][source]¶
Get the last persisted offset for changelog topic partition.
- Return type:
_UnionGenericAlias[int,None]
- set_persisted_offset(tp: TP, offset: int) None[source]¶
Set the last persisted offset for changelog topic partition.
- Return type:
None
- async on_rebalance(table: CollectionT, assigned: Set[TP], revoked: Set[TP], newly_assigned: Set[TP]) None[source]¶
Call when cluster is rebalancing.
- Return type:
None
- async on_recovery_completed(active_tps: Set[TP], standby_tps: Set[TP]) None[source]¶
Call when table recovery is completed after rebalancing.
- Return type:
None
- apply_changelog_batch(batch: Iterable[EventT], to_key: Callable[[Any], Any], to_value: Callable[[Any], Any]) None[source]¶
Apply batch of changelog events to local state.
- Return type:
None
- logger: logging.Logger = <Logger faust.tables.objects (WARNING)>¶