use std::time::Duration;
use async_trait::async_trait;
use crate::RedissonResult;
mod lock;
mod fair_lock;
mod multi_lock;
mod red_lock;
mod watchdog;
mod read_write;
pub use read_write::*;
pub use lock::*;
pub use fair_lock::*;
pub use multi_lock::*;
pub use red_lock::*;
#[async_trait]
pub trait AsyncRLockable {
fn get_lock(&self) -> AsyncRLock;
fn get_fair_lock(&self) -> AsyncRFairLock;
async fn lock(&self) -> RedissonResult<()>;
async fn try_lock(&self) -> RedissonResult<bool>;
async fn try_lock_timeout(&self, wait_time: Duration) -> RedissonResult<bool>;
async fn lock_lease(&self, lease_time: Duration) -> RedissonResult<()>;
async fn unlock(&self) -> RedissonResult<bool>;
async fn force_unlock(&self) -> RedissonResult<bool>;
async fn is_locked(&self) -> RedissonResult<bool>;
async fn is_held_by_current_thread(&self) -> bool;
}