diff --git a/google-cloud-core/src/main/java/com/google/cloud/GrpcServiceOptions.java b/google-cloud-core/src/main/java/com/google/cloud/GrpcServiceOptions.java index 75c99c9506e6..8777ac47834b 100644 --- a/google-cloud-core/src/main/java/com/google/cloud/GrpcServiceOptions.java +++ b/google-cloud-core/src/main/java/com/google/cloud/GrpcServiceOptions.java @@ -154,17 +154,6 @@ protected Builder(GrpcServiceOptions options) { @Override protected abstract GrpcServiceOptions build(); - /** - * Sets the scheduled executor factory. This method can be used to provide an user-defined - * scheduled executor to execute requests. - * - * @return the builder - */ - @Deprecated - public B executorFactory(ExecutorFactory executorFactory) { - return setExecutorFactory(executorFactory); - } - /** * Sets the scheduled executor factory. This method can be used to provide an user-defined * scheduled executor to execute requests. @@ -176,18 +165,6 @@ public B setExecutorFactory(ExecutorFactory executorFa return self(); } - /** - * Sets the timeout for the initial RPC, in milliseconds. Subsequent calls will use this value - * adjusted according to {@link #setTimeoutMultiplier(double)}. Default value is 20000. - * - * @return the builder - * @throws IllegalArgumentException if the provided timeout is < 0 - */ - @Deprecated - public B initialTimeout(int initialTimeout) { - return setInitialTimeout(initialTimeout); - } - /** * Sets the timeout for the initial RPC, in milliseconds. Subsequent calls will use this value * adjusted according to {@link #setTimeoutMultiplier(double)}. Default value is 20000. @@ -201,18 +178,6 @@ public B setInitialTimeout(int initialTimeout) { return self(); } - /** - * Sets the timeout multiplier. This value is used to compute the timeout for a retried RPC. - * Timeout is computed as {@code timeoutMultiplier * previousTimeout}. Default value is 1.5. - * - * @return the builder - * @throws IllegalArgumentException if the provided timeout multiplier is < 0 - */ - @Deprecated - public B timeoutMultiplier(double timeoutMultiplier) { - return setTimeoutMultiplier(timeoutMultiplier); - } - /** * Sets the timeout multiplier. This value is used to compute the timeout for a retried RPC. * Timeout is computed as {@code timeoutMultiplier * previousTimeout}. Default value is 1.5. @@ -226,18 +191,6 @@ public B setTimeoutMultiplier(double timeoutMultiplier) { return self(); } - /** - * Sets the maximum timeout for a RPC call, in milliseconds. Default value is 100000. If - * {@code maxTimeout} is lower than the initial timeout the {@link #setInitialTimeout(int)} - * value is used instead. - * - * @return the builder - */ - @Deprecated - public B maxTimeout(int maxTimeout) { - return setMaxTimeout(maxTimeout); - } - /** * Sets the maximum timeout for a RPC call, in milliseconds. Default value is 100000. If * {@code maxTimeout} is lower than the initial timeout the {@link #setInitialTimeout(int)} @@ -265,14 +218,6 @@ protected GrpcServiceOptions( maxTimeout = builder.maxTimeout <= initialTimeout ? initialTimeout : builder.maxTimeout; } - /** - * Returns a scheduled executor service provider. - */ - @Deprecated - protected ExecutorFactory executorFactory() { - return getExecutorFactory(); - } - /** * Returns a scheduled executor service provider. */ @@ -280,14 +225,6 @@ protected ExecutorFactory getExecutorFactory() { return executorFactory; } - /** - * Returns a builder for API call settings. - */ - @Deprecated - protected UnaryCallSettings.Builder apiCallSettings() { - return getApiCallSettings(); - } - /** * Returns a builder for API call settings. */ @@ -321,15 +258,6 @@ protected ChannelProvider getChannelProvider() { return builder.build(); } - /** - * Returns the timeout for the initial RPC, in milliseconds. Subsequent calls will use this value - * adjusted according to {@link #getTimeoutMultiplier()}. Default value is 20000. - */ - @Deprecated - public int initialTimeout() { - return getInitialTimeout(); - } - /** * Returns the timeout for the initial RPC, in milliseconds. Subsequent calls will use this value * adjusted according to {@link #getTimeoutMultiplier()}. Default value is 20000. @@ -338,15 +266,6 @@ public int getInitialTimeout() { return initialTimeout; } - /** - * Returns the timeout multiplier. This values is used to compute the timeout for a RPC. Timeout - * is computed as {@code timeoutMultiplier * previousTimeout}. Default value is 1.5. - */ - @Deprecated - public double timeoutMultiplier() { - return getTimeoutMultiplier(); - } - /** * Returns the timeout multiplier. This values is used to compute the timeout for a RPC. Timeout * is computed as {@code timeoutMultiplier * previousTimeout}. Default value is 1.5. @@ -355,14 +274,6 @@ public double getTimeoutMultiplier() { return timeoutMultiplier; } - /** - * Returns the maximum timeout for a RPC call, in milliseconds. Default value is 100000. - */ - @Deprecated - public int maxTimeout() { - return getMaxTimeout(); - } - /** * Returns the maximum timeout for a RPC call, in milliseconds. Default value is 100000. */ diff --git a/google-cloud-core/src/main/java/com/google/cloud/HttpServiceOptions.java b/google-cloud-core/src/main/java/com/google/cloud/HttpServiceOptions.java index 1613b68acb74..63ac94c114ef 100644 --- a/google-cloud-core/src/main/java/com/google/cloud/HttpServiceOptions.java +++ b/google-cloud-core/src/main/java/com/google/cloud/HttpServiceOptions.java @@ -98,12 +98,12 @@ protected Builder(HttpServiceOptions options) { @Override protected abstract HttpServiceOptions build(); + @Override @SuppressWarnings("unchecked") protected B self() { return (B) this; } - /** * Sets the HTTP transport factory. * @@ -114,7 +114,6 @@ public B setHttpTransportFactory(HttpTransportFactory httpTransportFactory) { return self(); } - /** * Sets the timeout in milliseconds to establish a connection. * @@ -127,7 +126,6 @@ public B setConnectTimeout(int connectTimeout) { return self(); } - /** * Sets the timeout in milliseconds to read data from an established connection. * @@ -153,7 +151,6 @@ protected HttpServiceOptions( readTimeout = builder.readTimeout; } - /** * Returns the HTTP transport factory. */ @@ -161,7 +158,6 @@ public HttpTransportFactory getHttpTransportFactory() { return httpTransportFactory; } - /** * Returns a request initializer responsible for initializing requests according to service * options. @@ -187,14 +183,6 @@ public void initialize(HttpRequest httpRequest) throws IOException { }; } - /** - * Returns the timeout in milliseconds to establish a connection. 0 is an infinite timeout, a - * negative number is the default value (20000). - */ - public int connectTimeout() { - return getConnectTimeout(); - } - /** * Returns the timeout in milliseconds to establish a connection. 0 is an infinite timeout, a * negative number is the default value (20000). @@ -203,7 +191,6 @@ public int getConnectTimeout() { return connectTimeout; } - /** * Returns the timeout in milliseconds to read from an established connection. 0 is an infinite * timeout, a negative number is the default value (20000).