pub struct InMemoryStreamSessionRepository { /* private fields */ }
Expand description
In-memory implementation of StreamSessionRepository
This implementation provides full ACID transaction support and is suitable for testing and development.
Implementations§
Trait Implementations§
Source§impl StreamSessionRepository for InMemoryStreamSessionRepository
impl StreamSessionRepository for InMemoryStreamSessionRepository
Source§fn begin_transaction<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DomainResult<Box<dyn SessionTransaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn begin_transaction<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DomainResult<Box<dyn SessionTransaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start a new transaction
Source§fn find_session<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
) -> Pin<Box<dyn Future<Output = DomainResult<Option<StreamSession>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_session<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
) -> Pin<Box<dyn Future<Output = DomainResult<Option<StreamSession>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find session by ID with read consistency guarantees
Source§fn save_session<'life0, 'async_trait>(
&'life0 self,
session: StreamSession,
expected_version: Option<u64>,
) -> Pin<Box<dyn Future<Output = DomainResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_session<'life0, 'async_trait>(
&'life0 self,
session: StreamSession,
expected_version: Option<u64>,
) -> Pin<Box<dyn Future<Output = DomainResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save session with optimistic concurrency control
Source§fn remove_session<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
) -> Pin<Box<dyn Future<Output = DomainResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_session<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
) -> Pin<Box<dyn Future<Output = DomainResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove session and all associated data
Source§fn find_sessions_by_criteria<'life0, 'async_trait>(
&'life0 self,
criteria: SessionQueryCriteria,
pagination: Pagination,
) -> Pin<Box<dyn Future<Output = DomainResult<SessionQueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_sessions_by_criteria<'life0, 'async_trait>(
&'life0 self,
criteria: SessionQueryCriteria,
pagination: Pagination,
) -> Pin<Box<dyn Future<Output = DomainResult<SessionQueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find sessions by criteria with pagination
Source§fn get_session_health<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
) -> Pin<Box<dyn Future<Output = DomainResult<SessionHealthSnapshot>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_session_health<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
) -> Pin<Box<dyn Future<Output = DomainResult<SessionHealthSnapshot>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get session health metrics
Source§fn session_exists<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
) -> Pin<Box<dyn Future<Output = DomainResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn session_exists<'life0, 'async_trait>(
&'life0 self,
session_id: SessionId,
) -> Pin<Box<dyn Future<Output = DomainResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check if session exists (lightweight operation)
Auto Trait Implementations§
impl Freeze for InMemoryStreamSessionRepository
impl !RefUnwindSafe for InMemoryStreamSessionRepository
impl Send for InMemoryStreamSessionRepository
impl Sync for InMemoryStreamSessionRepository
impl Unpin for InMemoryStreamSessionRepository
impl !UnwindSafe for InMemoryStreamSessionRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more