Struct cdc::Endpoint[][src]

pub struct Endpoint<T> {
    capture_regions: HashMap<u64, Delegate>,
    connections: HashMap<ConnID, Conn>,
    scheduler: Scheduler<Task>,
    raft_router: T,
    observer: CdcObserver,
    pd_client: Arc<dyn PdClient>,
    timer: SteadyTimer,
    min_ts_interval: Duration,
    tso_worker: Runtime,
    store_meta: Arc<Mutex<StoreMeta>>,
    concurrency_manager: ConcurrencyManager,
    workers: Runtime,
    scan_speed_limter: Limiter,
    max_scan_batch_bytes: usize,
    max_scan_batch_size: usize,
    min_resolved_ts: TimeStamp,
    min_ts_region_id: u64,
    old_value_cache: OldValueCache,
    hibernate_regions_compatible: bool,
    resolved_region_count: usize,
    unresolved_region_count: usize,
    tikv_clients: Arc<Mutex<HashMap<u64, TikvClient>>>,
    env: Arc<Environment>,
    security_mgr: Arc<SecurityManager>,
}

Fields

capture_regions: HashMap<u64, Delegate>connections: HashMap<ConnID, Conn>scheduler: Scheduler<Task>raft_router: Tobserver: CdcObserverpd_client: Arc<dyn PdClient>timer: SteadyTimermin_ts_interval: Durationtso_worker: Runtimestore_meta: Arc<Mutex<StoreMeta>>concurrency_manager: ConcurrencyManager

The concurrency manager for transactions. It’s needed for CDC to check locks when calculating resolved_ts.

workers: Runtimescan_speed_limter: Limitermax_scan_batch_bytes: usizemax_scan_batch_size: usizemin_resolved_ts: TimeStampmin_ts_region_id: u64old_value_cache: OldValueCachehibernate_regions_compatible: boolresolved_region_count: usizeunresolved_region_count: usizetikv_clients: Arc<Mutex<HashMap<u64, TikvClient>>>env: Arc<Environment>security_mgr: Arc<SecurityManager>

Implementations

impl<T: 'static + RaftStoreRouter<RocksEngine>> Endpoint<T>[src]

pub fn new(
    cfg: &CdcConfig,
    pd_client: Arc<dyn PdClient>,
    scheduler: Scheduler<Task>,
    raft_router: T,
    observer: CdcObserver,
    store_meta: Arc<Mutex<StoreMeta>>,
    concurrency_manager: ConcurrencyManager,
    env: Arc<Environment>,
    security_mgr: Arc<SecurityManager>
) -> Endpoint<T>
[src]

pub fn set_min_ts_interval(&mut self, dur: Duration)[src]

pub fn set_max_scan_batch_size(&mut self, max_scan_batch_size: usize)[src]

fn on_deregister(&mut self, deregister: Deregister)[src]

pub fn on_register(
    &mut self,
    request: ChangeDataRequest,
    downstream: Downstream,
    conn_id: ConnID,
    version: Version
)
[src]

pub fn on_multi_batch(
    &mut self,
    multi: Vec<CmdBatch>,
    old_value_cb: Box<dyn Fn(Key, TimeStamp, &mut OldValueCache) -> (Option<Vec<u8>>, Option<Statistics>) + Send>
)
[src]

fn on_region_ready(
    &mut self,
    observe_id: ObserveID,
    resolver: Resolver,
    region: Region
)
[src]

fn on_min_ts(&mut self, regions: Vec<u64>, min_ts: TimeStamp)[src]

fn broadcast_resolved_ts(&self, regions: Vec<u64>)[src]

fn broadcast_resolved_ts_compact(
    &self,
    region_id: u64,
    resolved_ts: u64,
    conn: &Conn
)
[src]

fn register_min_ts_event(&self)[src]

async fn region_resolved_ts_raft(
    regions: Vec<(u64, ObserveID)>,
    scheduler: &Scheduler<Task>,
    raft_router: T,
    min_ts: TimeStamp
) -> Vec<u64>
[src]

async fn region_resolved_ts_store(
    regions: Vec<(u64, ObserveID)>,
    store_meta: Arc<Mutex<StoreMeta>>,
    pd_client: Arc<dyn PdClient>,
    security_mgr: Arc<SecurityManager>,
    env: Arc<Environment>,
    cdc_clients: Arc<Mutex<HashMap<u64, TikvClient>>>,
    min_ts: TimeStamp
) -> Vec<u64>
[src]

fn on_open_conn(&mut self, conn: Conn)[src]

Trait Implementations

impl<T: 'static + RaftStoreRouter<RocksEngine>> Runnable for Endpoint<T>[src]

type Task = Task

impl<T: 'static + RaftStoreRouter<RocksEngine>> RunnableWithTimer for Endpoint<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Endpoint<T>

impl<T> Send for Endpoint<T> where
    T: Send

impl<T> !Sync for Endpoint<T>

impl<T> Unpin for Endpoint<T> where
    T: Unpin

impl<T> !UnwindSafe for Endpoint<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<V, W> ConvertFrom<W> for V where
    W: ConvertTo<V>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]