from _typeshed import Incomplete

log: Incomplete

class AtomicInteger:
    def __init__(self, val: int = 0) -> None: ...
    def increment(self): ...
    def decrement(self): ...
    def get(self): ...

class RecordAccumulator:
    DEFAULT_CONFIG: Incomplete
    config: Incomplete
    muted: Incomplete
    def __init__(self, **configs) -> None: ...
    @property
    def delivery_timeout_ms(self): ...
    @property
    def next_expiry_time_ms(self): ...
    def append(self, tp, timestamp_ms, key, value, headers, now=None): ...
    def reset_next_batch_expiry_time(self) -> None: ...
    def maybe_update_next_batch_expiry_time(self, batch) -> None: ...
    def expired_batches(self, now=None): ...
    def reenqueue(self, batch, now=None) -> None: ...
    def ready(self, cluster, now=None): ...
    def has_undrained(self): ...
    def drain_batches_for_one_node(self, cluster, node_id, max_size, now=None): ...
    def drain(self, cluster, nodes, max_size, now=None): ...
    def deallocate(self, batch) -> None: ...
    def flush_in_progress(self): ...
    def begin_flush(self) -> None: ...
    def await_flush_completion(self, timeout=None) -> None: ...
    @property
    def has_incomplete(self): ...
    def abort_incomplete_batches(self) -> None: ...
    def abort_undrained_batches(self, error) -> None: ...
    def close(self) -> None: ...

class IncompleteProducerBatches:
    def __init__(self) -> None: ...
    def add(self, batch) -> None: ...
    def remove(self, batch) -> None: ...
    def all(self): ...
    def __bool__(self) -> bool: ...
    __nonzero__ = __bool__
