Details
-
Task
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
None
Description
Right now, if one wants to change the configPollingInterval, one needs to add an explicit cast. Consider this bit of code:
CouchbaseEnvironment env = DefaultCouchbaseEnvironment
|
.builder()
|
.mutationTokensEnabled(true) |
.computationPoolSize(5) |
.build();
|
Cluster cluster = CouchbaseCluster.create(env, "localhost"); |
That's good, but to compile properly one needs to add a cast since the property is changed at the core.
CouchbaseEnvironment env = (CouchbaseEnvironment) DefaultCouchbaseEnvironment
|
.builder()
|
.mutationTokensEnabled(true) |
.computationPoolSize(5) |
.configPollInterval(2500) |
.build();
|
Cluster cluster = CouchbaseCluster.create(env, "localhost"); |
That's a bit smelly since we're basically asking the compiler to override type checking. I think I should be able to add .configPollInterval() there inline. Should it be overridden in the builder rather than just passing through?
Attachments
Issue Links
- duplicates
-
JCBC-1067 Expose config poll interval on Couchbase Environment
- Resolved