Skip to content

Commit

Permalink
Remove deprecated methods in google-cloud-core (#1707)
Browse files Browse the repository at this point in the history
  • Loading branch information
shinfan authored Mar 8, 2017
1 parent 007f340 commit be2c36f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,6 @@ protected Builder(GrpcServiceOptions<ServiceT, ServiceRpcT, OptionsT> options) {
@Override
protected abstract GrpcServiceOptions<ServiceT, ServiceRpcT, OptionsT> 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<ScheduledExecutorService> executorFactory) {
return setExecutorFactory(executorFactory);
}

/**
* Sets the scheduled executor factory. This method can be used to provide an user-defined
* scheduled executor to execute requests.
Expand All @@ -176,18 +165,6 @@ public B setExecutorFactory(ExecutorFactory<ScheduledExecutorService> 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 &lt; 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.
Expand All @@ -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 &lt; 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.
Expand All @@ -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)}
Expand Down Expand Up @@ -265,29 +218,13 @@ protected GrpcServiceOptions(
maxTimeout = builder.maxTimeout <= initialTimeout ? initialTimeout : builder.maxTimeout;
}

/**
* Returns a scheduled executor service provider.
*/
@Deprecated
protected ExecutorFactory<ScheduledExecutorService> executorFactory() {
return getExecutorFactory();
}

/**
* Returns a scheduled executor service provider.
*/
protected ExecutorFactory<ScheduledExecutorService> getExecutorFactory() {
return executorFactory;
}

/**
* Returns a builder for API call settings.
*/
@Deprecated
protected UnaryCallSettings.Builder apiCallSettings() {
return getApiCallSettings();
}

/**
* Returns a builder for API call settings.
*/
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ protected Builder(HttpServiceOptions<ServiceT, ServiceRpcT, OptionsT> options) {
@Override
protected abstract HttpServiceOptions<ServiceT, ServiceRpcT, OptionsT> build();

@Override
@SuppressWarnings("unchecked")
protected B self() {
return (B) this;
}


/**
* Sets the HTTP transport factory.
*
Expand All @@ -114,7 +114,6 @@ public B setHttpTransportFactory(HttpTransportFactory httpTransportFactory) {
return self();
}


/**
* Sets the timeout in milliseconds to establish a connection.
*
Expand All @@ -127,7 +126,6 @@ public B setConnectTimeout(int connectTimeout) {
return self();
}


/**
* Sets the timeout in milliseconds to read data from an established connection.
*
Expand All @@ -153,15 +151,13 @@ protected HttpServiceOptions(
readTimeout = builder.readTimeout;
}


/**
* Returns the HTTP transport factory.
*/
public HttpTransportFactory getHttpTransportFactory() {
return httpTransportFactory;
}


/**
* Returns a request initializer responsible for initializing requests according to service
* options.
Expand All @@ -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).
Expand All @@ -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).
Expand Down

0 comments on commit be2c36f

Please sign in to comment.