kvTimeout = env.kvTimeout(); } catch (Exception ex) { throw new DBException("Could not connect to Couchbase Bucket.", ex);
/** * Create a {@link CouchbaseBucket} that relies on the provided {@link AsyncBucket}. */ public CouchbaseBucket(AsyncBucket asyncBucket, final CouchbaseEnvironment env, final ClusterFacade core, final String name, final String username, final String password) { this.asyncBucket = asyncBucket; this.environment = env; this.kvTimeout = env.kvTimeout(); this.name = name; this.username = username; this.password = password; this.core = core; }
public DefaultSpatialViewRow(CouchbaseEnvironment env, AsyncSpatialViewRow asyncViewRow) { this.asyncViewRow = asyncViewRow; this.timeout = env.kvTimeout(); }
public DefaultViewRow(CouchbaseEnvironment env, AsyncViewRow asyncViewRow) { this.asyncViewRow = asyncViewRow; this.timeout = env.kvTimeout(); }
public CouchbaseRepository(Bucket bucket, CouchbaseEnvironment environment) { this.timeout = environment.kvTimeout(); this.asyncRepository = bucket.async().repository().toBlocking().single(); }
/** * Asynchronously fetch the document from the primary and if that operations fails try * all the replicas and return the first document that comes back from them (using the * environments KV timeout for both primary and replica). * * * @param id the document ID to fetch. * @param bucket the bucket to use when fetching the doc. * @return an {@link Single} with either 0 or 1 {@link JsonDocument}. */ @InterfaceStability.Experimental @InterfaceAudience.Public public Single<JsonDocument> getFirstPrimaryOrReplica(final String id, final Bucket bucket) { return getFirstPrimaryOrReplica(id, bucket, bucket.environment().kvTimeout()); }
/** * Asynchronously fetch the document from the primary and if that operations fails try * all the replicas and return the first document that comes back from them (using the * environments KV timeout for both primary and replica). * * @param id the document ID to fetch. * @param target the custom document type to use. * @param bucket the bucket to use when fetching the doc. * @return @return a {@link Single} with either 0 or 1 {@link Document}. */ @InterfaceStability.Experimental @InterfaceAudience.Public public static <D extends Document<?>> Single<D> getFirstPrimaryOrReplica(final String id, final Class<D> target, final Bucket bucket) { return getFirstPrimaryOrReplica(id, target, bucket, bucket.environment().kvTimeout()); }
: bucket.environment().kvTimeout(); final long anTimeout = opts.analyticsTimeout > 0 ? opts.analyticsTimeout