Trait tikv_util::logger::file_log::Rotator [−][src]
A trait that describes a file rotation operation.
Required methods
fn is_enabled(&self) -> bool
[src]
Check if the option is enabled in configuration.
Return true if the rotator
is valid.
fn prepare(&mut self, file: &File) -> Result<()>
[src]
Call by operator, initializes the states of rotators.
fn should_rotate(&self) -> bool
[src]
Return if the file need to be rotated.
fn on_write(&mut self, data: &[u8]) -> Result<()>
[src]
Call by operator, update rotators’ state while the operator try to write some data.
fn on_rotate(&mut self) -> Result<()>
[src]
Call by operator, update rotators’ state while the operator execute a rotation.