class
Movie::DatabaseExtension
- Movie::DatabaseExtension
- Movie::Extension
- Reference
- Object
Overview
Database extension that manages connection pool actors.
Defined in:
movie/persistence/behaviors.crConstructors
Instance Method Summary
- #acknowledge_outbox(owner : String, message_ids : Array(String)) : Int64
- #acquire_shard_lease(key : Persistence::ShardLeaseKey, owner : String, lease : Time::Span) : Persistence::ShardLeaseToken | Nil
- #backend_name : String
- #claim_outbox(owner : String, limit : Int32 = 100, lease : Time::Span = 30.seconds) : Array(Persistence::StoredOutboxEntry)
- #delete_events_to(persistence_id : String, sequence_nr : Int64) : Persistence::RetentionResult
- #delete_projection_offset(name : String) : Bool
- #health : Persistence::HealthSnapshot
- #metrics : Persistence::MetricsSnapshot
- #operation_timeout : Time::Span
- #pool : ActorRef(Persistence::ConnectionMessage)
- #projection_offset(name : String) : Int64
- #query_events(after_offset : Int64 = 0_i64, limit : Int32 = 100, persistence_id : String | Nil = nil) : Persistence::EventPage
-
#readiness : Persistence::ReadinessSnapshot
Performs an active backend/schema probe.
- #release_outbox(owner : String, message_id : String, error : String) : Bool
- #release_shard_lease(token : Persistence::ShardLeaseToken) : Bool
- #renew_shard_lease(token : Persistence::ShardLeaseToken, lease : Time::Span) : Persistence::ShardLeaseToken | Nil
- #run_maintenance : Persistence::MaintenanceResult
- #save_projection_offset(name : String, offset : Int64) : Int64
- #schema_version : Int64
-
#stop
Called when the system is shutting down.
- #telemetry : Persistence::Telemetry
Constructor Detail
def self.new(system : AbstractActorSystem, backend : Persistence::Backend, pool_size : Int32, queue_capacity : Int32, operation_timeout : Time::Span, resilience : Persistence::ResiliencePolicy = Persistence::ResiliencePolicy.disabled)
#
Instance Method Detail
def acquire_shard_lease(key : Persistence::ShardLeaseKey, owner : String, lease : Time::Span) : Persistence::ShardLeaseToken | Nil
#
def claim_outbox(owner : String, limit : Int32 = 100, lease : Time::Span = 30.seconds) : Array(Persistence::StoredOutboxEntry)
#
def delete_events_to(persistence_id : String, sequence_nr : Int64) : Persistence::RetentionResult
#
def query_events(after_offset : Int64 = 0_i64, limit : Int32 = 100, persistence_id : String | Nil = nil) : Persistence::EventPage
#
def readiness : Persistence::ReadinessSnapshot
#
Performs an active backend/schema probe. Unlike #health, this can block
for the configured operation timeout and reports connection failures in
the returned snapshot instead of raising them.
def renew_shard_lease(token : Persistence::ShardLeaseToken, lease : Time::Span) : Persistence::ShardLeaseToken | Nil
#
def stop
#
Description copied from class Movie::Extension
Called when the system is shutting down. Override to cleanup resources (close connections, stop services, etc.)