fn new(
        write_buffer: Arc<dyn WriteBufferReading>,
        partition: KafkaPartition,
        metrics: &metric::Registry,
    ) -> (Self, Arc<AtomicU64>) {
        let last_watermark = Arc::new(AtomicU64::new(0));
        let rx = Arc::clone(&last_watermark);

        let error_count = metrics
            .register_metric::<U64Counter>(
                "write_buffer_watermark_fetch_errors",
                "The total number of errors observed while trying to query for the high watermark",
            )
            .recorder([]);

        (
            Self {
                sequencer_id: partition
                    .get()
                    .try_into()
                    .expect("sequence ID out of range"),
                write_buffer,
                error_count,
                last_watermark,
            },
            rx,
        )
    }
/// Initialise a new poller.
///
/// The returned atomic will be updated with the most recent observed
/// watermark value for `sequencer_id` after a successful poll, or 0 if
/// never successfully polled.
Initialise a new poller.
The returned atomic will be updated with the most recent observed
watermark value for `sequencer_id` after a successful poll, or 0 if
never successfully polled.
Initialise a new poller . The returned atomic will be updated with the most recent observed watermark value for ` sequencer_id ` after a successful poll or 0 if never successfully polled .
fn new(
        write_buffer: Arc<dyn WriteBufferReading>,
        partition: KafkaPartition,
        metrics: &metric::Registry,
    ) -> (Self, Arc<AtomicU64>) {
        let last_watermark = Arc::new(AtomicU64::new(0));
        let rx = Arc::clone(&last_watermark);
        let error_count = metrics
            .register_metric::<U64Counter>(
                "write_buffer_watermark_fetch_errors",
                "The total number of errors observed while trying to query for the high watermark",
            )
            .recorder([]);
        (
            Self {
                sequencer_id: partition
                    .get()
                    .try_into()
                    .expect("sequence ID out of range"),
                write_buffer,
                error_count,
                last_watermark,
            },
            rx,
        )
    }
fn new ( write_buffer : Arc < dyn WriteBufferReading > , partition : KafkaPartition , metrics : & metric :: Registry , ) -> ( Self , Arc < AtomicU64 > ) { let last_watermark = Arc :: new ( AtomicU64 :: new ( 0 ) ) ; let rx = Arc :: clone ( & last_watermark ) ; let error_count = metrics . register_metric :: < U64Counter > ( " " , " " , ) . recorder ( [ ] ) ; ( Self { sequencer_id : partition . get ( ) . try_into ( ) . expect ( " " ) , write_buffer , error_count , last_watermark , } , rx , ) }
Initialise a new poller.
Initialise a new poller .
write_buffer
Arc<dyn WriteBufferReading>
partition
KafkaPartition
metrics
&metric::Registry
write_buffer
Arc<dyn WriteBufferReading>
partition
KafkaPartition
metrics
&metric::Registry