class Movie::Persistence::ConnectionWorker

Overview

Owns one database connection on a dedicated OS thread. Jobs are bounded and always execute on the same isolated execution context as the connection.

Defined in:

movie/persistence/connection_worker.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(backend : Backend, name : String, queue_capacity : Int32 = 256, telemetry : Telemetry = Telemetry.new, resilience : ResiliencePolicy = ResiliencePolicy.disabled) #

[View source]
def self.new(db_uri : String, name : String, queue_capacity : Int32 = 256, telemetry : Telemetry = Telemetry.new, resilience : ResiliencePolicy = ResiliencePolicy.disabled) #

[View source]

Instance Method Detail

def close #

[View source]
def execute(retryable : Bool = false, &operation : BackendConnection -> T) : T forall T #

[View source]