pub struct CompareNodeNetworkTime { /* private fields */ }
Expand description
| Sort eviction candidates by network/localhost
| and connection uptime.
|
| Candidates near the beginning are more
| likely to be evicted, and those near
| the end are more likely to be protected,
| e.g. less likely to be evicted.
|
| - First, nodes that are not is_local
| and that do not belong to network
,
| sorted by increasing uptime (from most
| recently connected to connected longer).
|
| - Then, nodes that are is_local
or
| belong to network
, sorted by increasing
| uptime.
|
Implementations§
source§impl CompareNodeNetworkTime
impl CompareNodeNetworkTime
pub fn new(is_local: bool, network: Network) -> Self
pub fn invoke( &self, a: &NodeEvictionCandidate, b: &NodeEvictionCandidate ) -> bool
Auto Trait Implementations§
impl RefUnwindSafe for CompareNodeNetworkTime
impl Send for CompareNodeNetworkTime
impl Sync for CompareNodeNetworkTime
impl Unpin for CompareNodeNetworkTime
impl UnwindSafe for CompareNodeNetworkTime
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more