Struct tikv::server::gc_worker::AutoGcConfig[][src]

pub struct AutoGcConfig<S: GcSafePointProvider, R: RegionInfoProvider> {
    pub safe_point_provider: S,
    pub region_info_provider: R,
    pub self_store_id: u64,
    pub poll_safe_point_interval: Duration,
    pub always_check_safe_point: bool,
    pub post_a_round_of_gc: Option<Box<dyn Fn() + Send>>,
}

The configurations of automatic GC.

Fields

safe_point_provider: Sregion_info_provider: Rself_store_id: u64

Used to find which peer of a region is on this TiKV, so that we can compose a Context.

poll_safe_point_interval: Durationalways_check_safe_point: bool

If this is set, safe_point will be checked before doing GC on every region while working. Otherwise safe_point will be only checked when poll_safe_point_interval has past since last checking.

post_a_round_of_gc: Option<Box<dyn Fn() + Send>>

This will be called when a round of GC has finished and goes back to idle state. This field is for test purpose.

Implementations

impl<S: GcSafePointProvider, R: RegionInfoProvider> AutoGcConfig<S, R>[src]

pub fn new(
    safe_point_provider: S,
    region_info_provider: R,
    self_store_id: u64
) -> Self
[src]

Creates a new config.

pub fn new_test_cfg(
    safe_point_provider: S,
    region_info_provider: R,
    self_store_id: u64
) -> Self
[src]

Creates a config for test purpose. The interval to poll safe point is as short as 0.1s and during GC it never skips checking safe point.

Auto Trait Implementations

impl<S, R> !RefUnwindSafe for AutoGcConfig<S, R>

impl<S, R> Send for AutoGcConfig<S, R>

impl<S, R> !Sync for AutoGcConfig<S, R>

impl<S, R> Unpin for AutoGcConfig<S, R> where
    R: Unpin,
    S: Unpin

impl<S, R> !UnwindSafe for AutoGcConfig<S, R>

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]