private ImmutableQueryOptions( @Nullable String wait, @Nullable String token, @Nullable BigInteger index, @Nullable String near, @Nullable String datacenter, ImmutableList<String> nodeMeta, ImmutableList<String> tag, ConsistencyMode consistencyMode) { this.wait = wait; this.token = token; this.index = index; this.near = near; this.datacenter = datacenter; this.nodeMeta = nodeMeta; this.tag = tag; this.consistencyMode = consistencyMode; initShim.consistencyMode(consistencyMode); this.isBlocking = initShim.isBlocking(); this.hasToken = initShim.hasToken(); this.nodeMetaQuery = initShim.getNodeMetaQuery(); this.tagsQuery = initShim.getTagsQuery(); this.initShim = null; }
private ImmutableQueryOptions(ImmutableQueryOptions.Builder builder) { this.wait = builder.wait; this.token = builder.token; this.index = builder.index; this.near = builder.near; this.datacenter = builder.datacenter; this.nodeMeta = builder.nodeMetaBuilder.build(); this.tag = builder.tagBuilder.build(); if (builder.consistencyMode != null) { initShim.consistencyMode(builder.consistencyMode); } this.consistencyMode = initShim.getConsistencyMode(); this.isBlocking = initShim.isBlocking(); this.hasToken = initShim.hasToken(); this.nodeMetaQuery = initShim.getNodeMetaQuery(); this.tagsQuery = initShim.getTagsQuery(); this.initShim = null; }
/** * @return The computed-at-construction value of the {@code isBlocking} attribute */ @Override public boolean isBlocking() { return initShim != null ? initShim.isBlocking() : isBlocking; }