Click or drag to resize

CouchbaseExtensionsOpenBucket Method (CouchbaseSettings, String, String, TimeSpan, NullableBoolean)

Returns a Couchbase bucket connection using specified settings and the cluster credentials.

Namespace:  Couchbase
Assembly:  Neon.Couchbase (in Neon.Couchbase.dll) Version: 2.14.0
Syntax
public static NeonBucket OpenBucket(
	this CouchbaseSettings settings,
	string username,
	string password,
	TimeSpan timeout = null,
	Nullable<bool> ignoreDurability = null
)

Parameters

settings
Type: Neon.DataCouchbaseSettings
The Couchbase settings.
username
Type: SystemString
The username.
password
Type: SystemString
The password.
timeout (Optional)
Type: SystemTimeSpan
The optional timeout (defaults to 60 seconds).
ignoreDurability (Optional)
Type: SystemNullableBoolean
Optionally configure the bucket to ignore durability parameters.

Return Value

Type: NeonBucket
The connected NeonBucket.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type CouchbaseSettings. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
TimeoutExceptionThrown if the bucket is not ready after waiting timeout.
Remarks

You may explicitly pass ignoreDurability=true for development and test environments where there may not be enough cluster nodes to satisfy durability constraints. If this is null (the default) then the bucket will look for the presence of the DEV_WORKSTATION environment variable and ignore durability constraints if this variable exists, otherwise durability constraints will be honored.

See Also