Trait rings_node::prelude::chunk::ChunkManager
source · pub trait ChunkManager {
// Required methods
fn list_completed(&self) -> Vec<Uuid, Global>;
fn list_pending(&self) -> Vec<Uuid, Global>;
fn get(&self, id: Uuid) -> Option<Bytes>;
fn remove(&mut self, id: Uuid);
fn remove_expired(&mut self);
fn handle(&mut self, chunk: Chunk) -> Option<Bytes>;
}
Expand description
A helper for manage chunks and chunk pool
Required Methods§
sourcefn list_completed(&self) -> Vec<Uuid, Global>
fn list_completed(&self) -> Vec<Uuid, Global>
list completed Chunks;
sourcefn list_pending(&self) -> Vec<Uuid, Global>
fn list_pending(&self) -> Vec<Uuid, Global>
list pending Chunks;
sourcefn get(&self, id: Uuid) -> Option<Bytes>
fn get(&self, id: Uuid) -> Option<Bytes>
get sepc msg via uuid if a msg is not completed, it will returns None
sourcefn remove_expired(&mut self)
fn remove_expired(&mut self)
remove expired chunks by ttl