Trait open_coroutine_core::common::Pool
source · pub trait Pool: Debug {
// Required methods
fn set_min_size(&self, min_size: usize);
fn get_min_size(&self) -> usize;
fn get_running_size(&self) -> usize;
fn set_max_size(&self, max_size: usize);
fn get_max_size(&self) -> usize;
fn set_keep_alive_time(&self, keep_alive_time: u64);
fn get_keep_alive_time(&self) -> u64;
}
Expand description
The Pool
abstraction.
Required Methods§
sourcefn set_min_size(&self, min_size: usize)
fn set_min_size(&self, min_size: usize)
Set the minimum number in this pool (the meaning of this number depends on the specific implementation).
sourcefn get_min_size(&self) -> usize
fn get_min_size(&self) -> usize
Get the minimum number in this pool (the meaning of this number depends on the specific implementation).
sourcefn get_running_size(&self) -> usize
fn get_running_size(&self) -> usize
Gets the number currently running in this pool.
sourcefn set_max_size(&self, max_size: usize)
fn set_max_size(&self, max_size: usize)
Set the maximum number in this pool (the meaning of this number depends on the specific implementation).
sourcefn get_max_size(&self) -> usize
fn get_max_size(&self) -> usize
Get the maximum number in this pool (the meaning of this number depends on the specific implementation).
sourcefn set_keep_alive_time(&self, keep_alive_time: u64)
fn set_keep_alive_time(&self, keep_alive_time: u64)
Set the maximum idle time running in this pool.
keep_alive_time
has ns
units.
sourcefn get_keep_alive_time(&self) -> u64
fn get_keep_alive_time(&self) -> u64
Get the maximum idle time running in this pool.
Returns in ns
units.