Skip to main content

CustomizedRegionLeaseRenewer

Trait CustomizedRegionLeaseRenewer 

Source
pub trait CustomizedRegionLeaseRenewer: Send + Sync {
    // Required method
    fn renew(
        &self,
        ctx: &mut Context,
        regions: HashMap<RegionId, RegionLeaseInfo>,
    ) -> Vec<GrantedRegion>;
}

Required Methods§

Source

fn renew( &self, ctx: &mut Context, regions: HashMap<RegionId, RegionLeaseInfo>, ) -> Vec<GrantedRegion>

Returns the leases to grant for the renewed regions.

The handler sets the candidate_lease_id of each returned lease from the entry of regions with the same region id, or to None if there is no such entry. The value set by the renewer is ignored.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§