class

CryBase::CouchBase::Services::KV::Pool

Inherits Reference < Object

Fixed-size pool of authenticated KV clients for concurrent fibers.

Constants

DEFAULT_SIZE = 10

Constructors

from_string(uri : String, username : String | Nil = nil, password : String | Nil = nil, bucket : String | Nil = nil, size : Int32 = DEFAULT_SIZE, connect_timeout : Time::Span = 5.seconds, *, vbucket_count : UInt16 | Nil = nil, discover_bucket_config : Bool = true, management_port : Int32 | Nil = nil, tls_verify : Bool | Nil = nil, tls_hostname : String | Nil = nil, tls_context : OpenSSL::SSL::Context::Client | Nil = nil) : Pool

Builds a KV endpoint from uri and opens a pool of authenticated clients for the first host in the connection string.

username, password, and bucket may be passed explicitly or embedded as couchbase://user:pass@host/bucket. Query parameters currently supported by this helper: tls_verify and tls_hostname.

pool = KV::Pool.from_string("couchbase://user:pass@node1/default")
Source
new(endpoint : Endpoint, username : String, password : String, bucket : String, size : Int32 = DEFAULT_SIZE, connect_timeout : Time::Span = 5.seconds, *, tls_verify : Bool = true, tls_hostname : String | Nil = nil, tls_context : OpenSSL::SSL::Context::Client | Nil = nil, vbucket_count : UInt16 = Constants::VBUCKET_COUNT)
Source

Instance methods

bucket
Source
bucket=(name : String) : String
Source
checkout
Source
close
Source
closed?
Source
collection(name : String) : CollectionContext(Pool)
Source
collection
Source
collection=(name : String) : String
Source
collection_id(scope : String, collection : String) : UInt32
Source
decrement(*args, **kwargs)
Source
delete(*args, **kwargs)
Source
endpoint
Source
get(*args, **kwargs)
Source
get_as(*args, **kwargs)
Source
increment(*args, **kwargs)
Source
scope(name : String) : ScopeContext(Pool)
Source
scope
Source
scope=(name : String) : String
Source
set(*args, **kwargs)
Source
size
Source
touch(*args, **kwargs)
Source
vbucket_count
Source
vbucket_count=(count : UInt16) : UInt16
Source