pub struct DynamoDbLockClient { /* private fields */ }
Expand description
Lock client backed by DynamoDb.
Implementations§
Source§impl DynamoDbLockClient
impl DynamoDbLockClient
Sourcepub fn try_new(
sdk_config: &SdkConfig,
lock_table_name: Option<String>,
billing_mode: Option<String>,
max_elapsed_request_time: Option<String>,
dynamodb_override_endpoint: Option<String>,
dynamodb_override_region: Option<String>,
dynamodb_override_access_key_id: Option<String>,
dynamodb_override_secret_access_key: Option<String>,
dynamodb_override_session_token: Option<String>,
) -> Result<Self, DynamoDbConfigError>
pub fn try_new( sdk_config: &SdkConfig, lock_table_name: Option<String>, billing_mode: Option<String>, max_elapsed_request_time: Option<String>, dynamodb_override_endpoint: Option<String>, dynamodb_override_region: Option<String>, dynamodb_override_access_key_id: Option<String>, dynamodb_override_secret_access_key: Option<String>, dynamodb_override_session_token: Option<String>, ) -> Result<Self, DynamoDbConfigError>
Creates a new DynamoDbLockClient from the supplied storage options.
Sourcepub async fn try_create_lock_table(
&self,
) -> Result<CreateLockTableResult, LockClientError>
pub async fn try_create_lock_table( &self, ) -> Result<CreateLockTableResult, LockClientError>
Create the lock table where DynamoDb stores the commit information for all delta tables.
Transparently handles the case where that table already exists, so it’s safe to call.
After create_table
operation is executed, the table state in DynamoDb is creating
, and
it’s not immediately useable. This method does not wait for the table state to become
active
, so transient failures might occur when immediately using the lock client.
Sourcepub fn get_lock_table_name(&self) -> String
pub fn get_lock_table_name(&self) -> String
Get the name of the lock table for transactional commits used by the DynamoDb lock client.
pub fn get_dynamodb_config(&self) -> &DynamoDbConfig
Sourcepub async fn get_commit_entry(
&self,
table_path: &str,
version: i64,
) -> Result<Option<CommitEntry>, LockClientError>
pub async fn get_commit_entry( &self, table_path: &str, version: i64, ) -> Result<Option<CommitEntry>, LockClientError>
Read a log entry from DynamoDb.
Sourcepub async fn put_commit_entry(
&self,
table_path: &str,
entry: &CommitEntry,
) -> Result<(), LockClientError>
pub async fn put_commit_entry( &self, table_path: &str, entry: &CommitEntry, ) -> Result<(), LockClientError>
write new entry to to DynamoDb lock table.
Sourcepub async fn get_latest_entry(
&self,
table_path: &str,
) -> Result<Option<CommitEntry>, LockClientError>
pub async fn get_latest_entry( &self, table_path: &str, ) -> Result<Option<CommitEntry>, LockClientError>
Get the latest entry (entry with highest version).
Sourcepub async fn get_latest_entries(
&self,
table_path: &str,
limit: i64,
) -> Result<Vec<CommitEntry>, LockClientError>
pub async fn get_latest_entries( &self, table_path: &str, limit: i64, ) -> Result<Vec<CommitEntry>, LockClientError>
Find the latest entry in the lock table for the delta table on the specified table_path
.
Sourcepub async fn update_commit_entry(
&self,
version: i64,
table_path: &str,
) -> Result<UpdateLogEntryResult, LockClientError>
pub async fn update_commit_entry( &self, version: i64, table_path: &str, ) -> Result<UpdateLogEntryResult, LockClientError>
Update existing log entry
Sourcepub async fn delete_commit_entry(
&self,
version: i64,
table_path: &str,
) -> Result<(), LockClientError>
pub async fn delete_commit_entry( &self, version: i64, table_path: &str, ) -> Result<(), LockClientError>
Delete existing log entry if it is not already complete
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DynamoDbLockClient
impl !RefUnwindSafe for DynamoDbLockClient
impl Send for DynamoDbLockClient
impl Sync for DynamoDbLockClient
impl Unpin for DynamoDbLockClient
impl !UnwindSafe for DynamoDbLockClient
Blanket Implementations§
Source§impl<T> AsAny for T
impl<T> AsAny for T
Source§fn any_ref(&self) -> &(dyn Any + Send + Sync + 'static)
fn any_ref(&self) -> &(dyn Any + Send + Sync + 'static)
dyn Any
reference to the object: Read moreSource§fn as_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
fn as_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync>
Arc<dyn Any>
reference to the object: Read moreSource§fn into_any(self: Box<T>) -> Box<dyn Any + Send + Sync>
fn into_any(self: Box<T>) -> Box<dyn Any + Send + Sync>
Box<dyn Any>
: Read moreSource§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
std::any::type_name
, since Any
does not provide it and
Any::type_id
is useless as a debugging aid (its Debug
is just a mess of hex digits).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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more