pub struct RedisAdapter<C> { /* private fields */ }Expand description
Remote over a caller-owned redis crate connection handle.
See the module documentation for the caller’s responsibilities.
Implementations§
Source§impl<C: RedisConnection> RedisAdapter<C>
impl<C: RedisConnection> RedisAdapter<C>
Sourcepub fn connection(&self) -> &C
pub fn connection(&self) -> &C
The borrowed connection handle.
Sourcepub fn invalidate_decimal<'a>(
&'a self,
watermark_key: &'a str,
future_buffer_ms: &'a str,
invalidated_at_ms: &'a str,
) -> BoxFuture<'a, Result<(), BoxError>>
pub fn invalidate_decimal<'a>( &'a self, watermark_key: &'a str, future_buffer_ms: &'a str, invalidated_at_ms: &'a str, ) -> BoxFuture<'a, Result<(), BoxError>>
The script’s raw decimal boundary for out-of-band tooling and conformance replay. Validation inside Lua precedes every mutation.
EVALSHA runs first; any failure is retried exactly once as EVAL
with identical arguments, and a failed retry surfaces unmodified. The
transition is idempotent (the watermark only advances and its
retention only widens), so a duplicate run after an ambiguous failure
is harmless. A successful reply must be the integer 1.
Trait Implementations§
Source§impl<C: Clone> Clone for RedisAdapter<C>
impl<C: Clone> Clone for RedisAdapter<C>
Source§fn clone(&self) -> RedisAdapter<C>
fn clone(&self) -> RedisAdapter<C>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<C> Debug for RedisAdapter<C>
impl<C> Debug for RedisAdapter<C>
Source§impl<C: RedisConnection> Remote for RedisAdapter<C>
impl<C: RedisConnection> Remote for RedisAdapter<C>
Source§fn write(&self, request: WriteRequest) -> BoxFuture<'_, Result<(), BoxError>>
fn write(&self, request: WriteRequest) -> BoxFuture<'_, Result<(), BoxError>>
Exactly one native SET of the complete frame. It neither reads nor
modifies the entity watermark; the frame’s stamp is stored exactly.
Source§fn invalidate(
&self,
request: InvalidateRequest,
) -> BoxFuture<'_, Result<(), BoxError>>
fn invalidate( &self, request: InvalidateRequest, ) -> BoxFuture<'_, Result<(), BoxError>>
The caller’s clock sample stays stable through the EVAL retry, so
one logical invalidation proposes one watermark.
Source§fn read(
&self,
request: ReadRequest,
context: ReadContext,
) -> BoxFuture<'_, Result<ReadResult, BoxError>>
fn read( &self, request: ReadRequest, context: ReadContext, ) -> BoxFuture<'_, Result<ReadResult, BoxError>>
Err counts as a cache_read
error and the call falls through to the source.