Skip to content

Commit 52c5d12

Browse files
committed
Gardening: Polish Javadoc for config methods
Change-Id: I802b2a97fd84a7b7d53d6c12ab60fd89cd1fb4f7 Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/207794 Tested-by: David Nault <[email protected]> Reviewed-by: David Nault <[email protected]>
1 parent 5d10cda commit 52c5d12

File tree

1 file changed

+49
-49
lines changed

1 file changed

+49
-49
lines changed

core-io/src/main/java/com/couchbase/client/core/env/CoreEnvironment.java

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -638,12 +638,12 @@ public static class Builder<SELF extends Builder<SELF>> {
638638
protected Builder() { }
639639

640640
/**
641-
* Allows to configure the {@link IoEnvironment} through a provided builder.
641+
* Passes the {@link IoEnvironment.Builder} to the provided consumer.
642642
* <p>
643-
* This method is preferred over {@link #ioEnvironment(IoEnvironment.Builder)} since then properties
644-
* on an already existing configuration are not overridden.
643+
* Allows customizing I/O thread pools and other resources.
644+
* For more I/O settings, see: {@link #ioConfig(Consumer)}
645645
*
646-
* @param builderConsumer the builder for the {@link IoEnvironment} to customize.
646+
* @param builderConsumer configures the builder.
647647
* @return this {@link Builder} for chaining purposes.
648648
*/
649649
public SELF ioEnvironment(final Consumer<IoEnvironment.Builder> builderConsumer) {
@@ -652,12 +652,12 @@ public SELF ioEnvironment(final Consumer<IoEnvironment.Builder> builderConsumer)
652652
}
653653

654654
/**
655-
* Allows to configure the {@link IoConfig} through a provided builder.
655+
* Passes the {@link IoConfig.Builder} to the provided consumer.
656656
* <p>
657-
* This method is preferred over {@link #ioConfig(IoConfig.Builder)} since then properties
658-
* on an already existing configuration are not overridden.
657+
* This is the main way to control how the SDK behaves at the lower levels.
658+
* It allows customizing settings such as tcp keepalive, number of connections, circuit breakers, etc.
659659
*
660-
* @param builderConsumer the builder for the {@link IoConfig} to customize.
660+
* @param builderConsumer configures the builder.
661661
* @return this {@link Builder} for chaining purposes.
662662
*/
663663
public SELF ioConfig(final Consumer<IoConfig.Builder> builderConsumer) {
@@ -666,12 +666,14 @@ public SELF ioConfig(final Consumer<IoConfig.Builder> builderConsumer) {
666666
}
667667

668668
/**
669-
* Allows to configure the {@link CompressionConfig} through a provided builder.
669+
* Passes the {@link CompressionConfig.Builder} to the provided consumer.
670670
* <p>
671-
* This method is preferred over {@link #compressionConfig(CompressionConfig.Builder)} since then properties
672-
* on an already existing configuration are not overridden.
671+
* Allows customizing document value compression settings.
672+
* <p>
673+
* Usually this does not need to be tuned, but thresholds can be modified
674+
* or compression can be disabled completely if needed.
673675
*
674-
* @param builderConsumer the builder for the {@link CompressionConfig} to customize.
676+
* @param builderConsumer configures the builder.
675677
* @return this {@link Builder} for chaining purposes.
676678
*/
677679
public SELF compressionConfig(final Consumer<CompressionConfig.Builder> builderConsumer) {
@@ -680,12 +682,14 @@ public SELF compressionConfig(final Consumer<CompressionConfig.Builder> builderC
680682
}
681683

682684
/**
683-
* Allows to configure the {@link SecurityConfig} through a provided builder.
685+
* Passes the {@link SecurityConfig.Builder} to the provided consumer.
686+
* <p>
687+
* Allows configuring everything related to TLS/encrypted connections.
684688
* <p>
685-
* This method is preferred over {@link #securityConfig(SecurityConfig.Builder)} since then properties
686-
* on an already existing configuration are not overridden.
689+
* Note that if you are looking to use client certificate authentication,
690+
* please refer to the {@link CertificateAuthenticator} instead.
687691
*
688-
* @param builderConsumer the builder for the {@link SecurityConfig} to customize.
692+
* @param builderConsumer configures the builder.
689693
* @return this {@link Builder} for chaining purposes.
690694
*/
691695
public SELF securityConfig(final Consumer<SecurityConfig.Builder> builderConsumer) {
@@ -694,12 +698,14 @@ public SELF securityConfig(final Consumer<SecurityConfig.Builder> builderConsume
694698
}
695699

696700
/**
697-
* Allows to configure the {@link TimeoutConfig} through a provided builder.
701+
* Passes the {@link TimeoutConfig.Builder} to the provided consumer.
702+
* <p>
703+
* Allows customizing the default timeouts for all operations.
698704
* <p>
699-
* This method is preferred over {@link #timeoutConfig(TimeoutConfig.Builder)} since then properties
700-
* on an already existing configuration are not overridden.
705+
* The default timeout can be overridden on a per-request basis
706+
* using the "timeout" property of the request's option block.
701707
*
702-
* @param builderConsumer the builder for the {@link TimeoutConfig} to customize.
708+
* @param builderConsumer configures the builder.
703709
* @return this {@link Builder} for chaining purposes.
704710
*/
705711
public SELF timeoutConfig(final Consumer<TimeoutConfig.Builder> builderConsumer) {
@@ -708,12 +714,9 @@ public SELF timeoutConfig(final Consumer<TimeoutConfig.Builder> builderConsumer)
708714
}
709715

710716
/**
711-
* Allows to configure the {@link LoggerConfig} through a provided builder.
712-
* <p>
713-
* This method is preferred over {@link #loggerConfig(LoggerConfig.Builder)} since then properties
714-
* on an already existing configuration are not overridden.
717+
* Passes the {@link LoggerConfig.Builder} to the provided consumer.
715718
*
716-
* @param builderConsumer the builder for the {@link LoggerConfig} to customize.
719+
* @param builderConsumer configures the builder.
717720
* @return this {@link Builder} for chaining purposes.
718721
*/
719722
public SELF loggerConfig(final Consumer<LoggerConfig.Builder> builderConsumer) {
@@ -722,12 +725,15 @@ public SELF loggerConfig(final Consumer<LoggerConfig.Builder> builderConsumer) {
722725
}
723726

724727
/**
725-
* Allows to configure the {@link OrphanReporterConfig} through a provided builder.
728+
* Passes the {@link OrphanReporterConfig.Builder} to the provided consumer.
729+
* <p>
730+
* Allows customizing the behavior of the orphan response reporter.
726731
* <p>
727-
* This method is preferred over {@link #orphanReporterConfig(OrphanReporterConfig.Builder)} since then properties
728-
* on an already existing configuration are not overridden.
732+
* The orphan reporter logs all responses that arrived when the requesting side is not listening anymore (usually
733+
* because of a timeout). The config can be modified to tune certain properties like the sample size or the emit
734+
* interval.
729735
*
730-
* @param builderConsumer the builder for the {@link OrphanReporterConfig} to customize.
736+
* @param builderConsumer configures the builder.
731737
* @return this {@link Builder} for chaining purposes.
732738
*/
733739
public SELF orphanReporterConfig(final Consumer<OrphanReporterConfig.Builder> builderConsumer) {
@@ -736,12 +742,9 @@ public SELF orphanReporterConfig(final Consumer<OrphanReporterConfig.Builder> bu
736742
}
737743

738744
/**
739-
* Allows to configure the {@link ThresholdLoggingTracerConfig} through a provided builder.
740-
* <p>
741-
* This method is preferred over {@link #thresholdLoggingTracerConfig(ThresholdLoggingTracerConfig.Builder)} since
742-
* then properties on an already existing configuration are not overridden.
745+
* Passes the {@link ThresholdLoggingTracerConfig.Builder} to the provided consumer.
743746
*
744-
* @param builderConsumer the builder for the {@link ThresholdLoggingTracerConfig} to customize.
747+
* @param builderConsumer configures the builder.
745748
* @return this {@link Builder} for chaining purposes.
746749
*/
747750
public SELF thresholdLoggingTracerConfig(final Consumer<ThresholdLoggingTracerConfig.Builder> builderConsumer) {
@@ -750,12 +753,9 @@ public SELF thresholdLoggingTracerConfig(final Consumer<ThresholdLoggingTracerCo
750753
}
751754

752755
/**
753-
* Allows to configure the {@link LoggingMeterConfig} through a provided builder.
754-
* <p>
755-
* This method is preferred over {@link #loggingMeterConfig(LoggingMeterConfig.Builder)} since then properties
756-
* on an already existing configuration are not overridden.
756+
* Passes the {@link LoggingMeterConfig.Builder} to the provided consumer.
757757
*
758-
* @param builderConsumer the builder for the {@link LoggingMeterConfig} to customize.
758+
* @param builderConsumer configures the builder.
759759
* @return this {@link Builder} for chaining purposes.
760760
*/
761761
public SELF loggingMeterConfig(final Consumer<LoggingMeterConfig.Builder> builderConsumer) {
@@ -806,7 +806,7 @@ public SELF load(final PropertyLoader<Builder> loader) {
806806
*
807807
* @param ioEnvironment the IO environment to customize.
808808
* @return this {@link Builder} for chaining purposes.
809-
* @deprecated Please use {@link #ioEnvironment(Consumer)} instead.
809+
* @deprecated This method clobbers any previously configured values. Please use {@link #ioEnvironment(Consumer)} instead.
810810
*/
811811
@Deprecated
812812
public SELF ioEnvironment(final IoEnvironment.Builder ioEnvironment) {
@@ -842,7 +842,7 @@ public IoEnvironment.Builder ioEnvironmentConfig() {
842842
*
843843
* @param ioConfig the custom I/O config to use.
844844
* @return this {@link Builder} for chaining purposes.
845-
* @deprecated Please use {@link #ioConfig(Consumer)} instead.
845+
* @deprecated This method clobbers any previously configured values. Please use {@link #ioConfig(Consumer)} instead.
846846
*/
847847
@Deprecated
848848
public SELF ioConfig(final IoConfig.Builder ioConfig) {
@@ -868,7 +868,7 @@ public IoConfig.Builder ioConfig() {
868868
*
869869
* @param orphanReporterConfig the custom orphan reporter config.
870870
* @return this {@link Builder} for chaining purposes.
871-
* @deprecated Please use {@link #orphanReporterConfig(Consumer)} instead.
871+
* @deprecated This method clobbers any previously configured values. Please use {@link #orphanReporterConfig(Consumer)} instead.
872872
*/
873873
@Deprecated
874874
public SELF orphanReporterConfig(final OrphanReporterConfig.Builder orphanReporterConfig) {
@@ -886,7 +886,7 @@ public OrphanReporterConfig.Builder orphanReporterConfig() {
886886
}
887887

888888
/**
889-
* @deprecated Please use {@link #loggingMeterConfig(Consumer)} instead.
889+
* @deprecated This method clobbers any previously configured values. Please use {@link #loggingMeterConfig(Consumer)} instead.
890890
*/
891891
@Deprecated
892892
public SELF loggingMeterConfig(final LoggingMeterConfig.Builder loggingMeterConfig) {
@@ -903,7 +903,7 @@ public LoggingMeterConfig.Builder loggingMeterConfig() {
903903
*
904904
* @param thresholdRequestTracerConfig the configuration which should be used.
905905
* @return this {@link Builder} for chaining purposes.
906-
* @deprecated Please use {@link #thresholdLoggingTracerConfig(Consumer)} instead.
906+
* @deprecated This method clobbers any previously configured values. Please use {@link #thresholdLoggingTracerConfig(Consumer)} instead.
907907
*/
908908
@Deprecated
909909
public SELF thresholdRequestTracerConfig(final ThresholdRequestTracerConfig.Builder thresholdRequestTracerConfig) {
@@ -922,7 +922,7 @@ public ThresholdRequestTracerConfig.Builder thresholdRequestTracerConfig() {
922922
*
923923
* @param thresholdLoggingTracerConfig the configuration which should be used.
924924
* @return this {@link Builder} for chaining purposes.
925-
* @deprecated Please use {@link #thresholdLoggingTracerConfig(Consumer)} instead.
925+
* @deprecated This method clobbers any previously configured values. Please use {@link #thresholdLoggingTracerConfig(Consumer)} instead.
926926
*/
927927
@Deprecated
928928
public SELF thresholdLoggingTracerConfig(final ThresholdLoggingTracerConfig.Builder thresholdLoggingTracerConfig) {
@@ -942,7 +942,7 @@ public ThresholdLoggingTracerConfig.Builder thresholdLoggingTracerConfig() {
942942
*
943943
* @param compressionConfig the custom compression config.
944944
* @return this {@link Builder} for chaining purposes.
945-
* @deprecated Please use {@link #compressionConfig(Consumer)} instead.
945+
* @deprecated This method clobbers any previously configured values. Please use {@link #compressionConfig(Consumer)} instead.
946946
*/
947947
@Deprecated
948948
public SELF compressionConfig(final CompressionConfig.Builder compressionConfig) {
@@ -967,7 +967,7 @@ public CompressionConfig.Builder compressionConfig() {
967967
*
968968
* @param securityConfig the custom security config to use.
969969
* @return this {@link Builder} for chaining purposes.
970-
* @deprecated Please use {@link #securityConfig(Consumer)} instead.
970+
* @deprecated This method clobbers any previously configured values. Please use {@link #securityConfig(Consumer)} instead.
971971
*/
972972
@Deprecated
973973
public SELF securityConfig(final SecurityConfig.Builder securityConfig) {
@@ -991,7 +991,7 @@ public SecurityConfig.Builder securityConfig() {
991991
*
992992
* @param timeoutConfig the custom timeout config to use.
993993
* @return this {@link Builder} for chaining purposes.
994-
* @deprecated Please use {@link #timeoutConfig(Consumer)} instead.
994+
* @deprecated This method clobbers any previously configured values. Please use {@link #timeoutConfig(Consumer)} instead.
995995
*/
996996
@Deprecated
997997
public SELF timeoutConfig(final TimeoutConfig.Builder timeoutConfig) {
@@ -1016,7 +1016,7 @@ public TimeoutConfig.Builder timeoutConfig() {
10161016
*
10171017
* @param loggerConfig the custom logger config to use.
10181018
* @return this {@link Builder} for chaining purposes.
1019-
* @deprecated Please use {@link #loggerConfig(Consumer)} instead.
1019+
* @deprecated This method clobbers any previously configured values. Please use {@link #loggerConfig(Consumer)} instead.
10201020
*/
10211021
@Deprecated
10221022
public SELF loggerConfig(final LoggerConfig.Builder loggerConfig) {

0 commit comments

Comments
 (0)