Example #1
0
 def __init__(
     self,
     initial: InitialPublishRequest,
     batching_settings: BatchSettings,
     factory: ConnectionFactory[PublishRequest, PublishResponse],
 ):
     self._initial = initial
     self._batching_settings = batching_settings
     self._connection = RetryingConnection(factory, self)
     self._batcher = SerialBatcher(self)
     self._outstanding_writes = []
     self._receiver = None
     self._flusher = None
Example #2
0
 def __init__(
     self,
     initial: InitialCommitCursorRequest,
     flush_seconds: float,
     factory: ConnectionFactory[StreamingCommitCursorRequest,
                                StreamingCommitCursorResponse],
 ):
     self._initial = initial
     self._flush_seconds = flush_seconds
     self._connection = RetryingConnection(factory, self)
     self._batcher = SerialBatcher(self)
     self._outstanding_commits = []
     self._receiver = None
     self._flusher = None