未验证 提交 3960015b 编写于 作者: R Roberto Perez Alcolea 提交者: GitHub

Merge pull request #475 from Netflix/replace-bintray

Upgrade nebula.netflixoss to replace bintray publication and update TravisCI Secrets
......@@ -63,3 +63,6 @@ atlassian-ide-plugin.xml
# NetBeans specific files/directories
.nbattrs
# publishing secrets
secrets/signing-key
......@@ -6,10 +6,12 @@ install: "./installViaTravis.sh"
script: "./buildViaTravis.sh"
env:
global:
- secure: mprd3lRQDzNFIqWJ/hhHt84Oo1rQFv5Hp2GyySTx/xPiu2Qv6F+C0YOHTHIT2+BxxW/7580w/8e6L8YLxiVX0d2J8YwQm7tPoc4WN3kV9K6U/LTdVmNAePNyeMq1R13CPAguDVG2CY4+Y08rdU7OYDuL1mQFHzPmvhGzLnN4kiE=
- secure: INE6Zlu2EMfRZI13F8B4RyKkmvtaMA8K5bMYwRPWDJ+PUnGUfU27xIjx8mY+dd6A2JfSeeoF7dkOko4xi+PiiayY2Byi8fneja1j01Du7l0okBaeROGlLscLid2ME0yDCql06vERhCdIDEBMpZzVu8GbqpZ1z/x0JQ0YgBiMVEc=
- secure: OumwxBfa3lOrT2BHRx9a9Ppxiua0IbEtRFs2CQHCWOW6iYRLDavLqya+oMPvx+gAlZRX54VTYuuxh858dxR8O94xPi4NvZ/POvoTdgU1MNekBqYsuWys3B4Dw8CMrrpfzvtD8tWe8TkgwGpzzpRuEzQ6bvh0uCAmiQ0kQhKA8+0=
- secure: TeSjCxSjlH0fE30WoBWOPIWPMMn66v6KGAMbUGPO1Z98q1AXptmcFnAob0of8Q/HLkR6Paxtl4r4yt35pqakw40M6s5w4O2PeXPArZZE+qBRR9izRpXIPq+jAIZwabYkEgLMhF3u3VOIYmP94hGvFfddtuTF8UmqkEeK1/AmruU=
- secure: EKzKmfCI/HzvxH7f9Y2YllaKkTDs5rCJyyd0MZ30ZlwjeExF0SFOum9lyu6ujbZEJrW3ybfJ8YEmUJwawo857eSbjOfhJ0NB+mC5W7ItlOYHV3q2jGmAGdgWQQYij3YtFel+mA/BsxmvVh/fgLz4UJ40dFD0wbvX8wKQ7iNkkDQ=
- secure: ENxhFcR6dj3bSecQES9/Hf2hOo2uQP7BARIfQtaxd2+kUQLLKIE7Ik7ldds7bYWO4q/AOLbgQbbggLldCC48uv7e3G8XJY1L9NierSkdV0gxPK5gR1Wqt1OZQXdQVuaSNLTur560YN5qD+7hpeiO3IViD72uuhWNKB5D7HaQVHY=
- secure: qSuKX/JeiB2I6KXo8xuQsaerx9BrTfhQMuqpmhCVlhITH2TQYUf6iLDoh8/rIMfD1HT8Y3oTinVk6++mjEtMzxdqgrPrUtznXiOktx+8feClcymJ/T2FA0opHlfteauszc/PUE0ItNQm2Ci3rWf2T7r8MU7rQkVzC8nk3KHqySQ=
- secure: p4/UI+OCh02Vxavz3Jc24z9JS45uWh63JgAWRQobX2zw1qjFGHzoOnuC/N8TE+CXVwMK7cvWkykZUi8BCAlloiIfLtQ+xeTqtez+S/y0siyyCBANAVIE5m/tMyssni1zWqdYWFPh0lY87zp7A/yC7zo9L1uoeWEGZOiqIpVggdE=
- secure: HOC6j+YkpjGHhk4lE7/1q+tNmNLgksrpS8gx7ijfR/tcKagToznPG2RH6fjMJYQ8cw7Njp9oMCCAuaOxKLPioxb4fEGILnB+ZitvVDc3aqOSDN2pWIE2wZPzzvqyKPBd4BQFCJXNlo8kyJPGN78dm7e6I0rpYWB3QBTkjFJJA+E=
- secure: fP8b3J1LhxPEQrz7I1kLhW79Ax3LJmceuJkx2Cr/WjaV21jR2u+KVP3Fg9aVo5ECgJsenC28cYl7YitogHLl4bfpJVLnMtySzkMF2A7dHuR9semnliqCBcClgxwvX2k/1eUFSBdHkOucy6ZJelCzitvhJ9jQcQFSx6D5SoIUSZk=
cache:
directories:
- "$HOME/.gradle/caches"
plugins {
id 'nebula.netflixoss' version '2.2.10'
id 'nebula.netflixoss' version '9.1.0'
}
// Establish version and status
......
......@@ -6,18 +6,20 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
./gradlew build
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build snapshot
./gradlew -Prelease.travisci=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" build snapshot
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
case "$TRAVIS_TAG" in
*-rc\.*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate
./gradlew -Prelease.travisci=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" -Prelease.useLastTag=true candidate
;;
*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final
./gradlew -Prelease.travisci=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.username="$NETFLIX_OSS_SONATYPE_USERNAME" -Psonatype.password="$NETFLIX_OSS_SONATYPE_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" -Prelease.useLastTag=true final
;;
esac
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew build
fi
......@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
#!/bin/bash
# This script will build the project.
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
./gradlew assemble
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -Prelease.travisci=true assemble
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew assemble
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
echo "Decrypting publishing credentials"
openssl aes-256-cbc -k "$NETFLIX_OSS_SIGNING_FILE_PASSWORD" -in secrets/signing-key.enc -out secrets/signing-key -d
fi
......@@ -2,6 +2,9 @@ dependencies {
compile project(':ribbon-core')
compile project(':ribbon-loadbalancer')
compile "com.netflix.eureka:eureka-client:${eureka_version}"
compile "com.netflix.archaius:archaius-core:0.7.5"
compile "commons-configuration:commons-configuration:1.8"
compile "javax.inject:javax.inject:1"
compile 'com.google.code.findbugs:annotations:2.0.0'
compile "org.slf4j:slf4j-api:${slf4j_version}"
......
......@@ -4,7 +4,6 @@ dependencies {
compile "io.reactivex:rxjava:${rx_java_version}"
compile "org.slf4j:slf4j-api:${slf4j_version}"
testCompile project(':ribbon-test')
testCompile project(path: ':ribbon', configuration: 'test')
testCompile "junit:junit:${junit_version}"
testCompile "org.powermock:powermock-easymock-release-full:${powermock_version}"
testCompile "org.easymock:easymock:${easymock_version}"
......
/*
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.ribbon.proxy.sample;
import com.netflix.hystrix.HystrixInvokableInfo;
import com.netflix.ribbon.ServerError;
import com.netflix.ribbon.UnsuccessfulResponseException;
import com.netflix.ribbon.http.HttpResponseValidator;
import com.netflix.ribbon.hystrix.FallbackHandler;
import io.netty.buffer.ByteBuf;
import io.reactivex.netty.protocol.http.client.HttpClientResponse;
import rx.Observable;
import java.util.Map;
/**
* @author Tomasz Bak
*/
public class HystrixHandlers {
public static class SampleHttpResponseValidator implements HttpResponseValidator {
@Override
public void validate(HttpClientResponse<ByteBuf> response) throws UnsuccessfulResponseException, ServerError {
}
}
public static class MovieFallbackHandler implements FallbackHandler<Movie> {
@Override
public Observable<Movie> getFallback(HystrixInvokableInfo<?> hystrixInfo, Map<String, Object> requestProperties) {
return null;
}
}
}
package com.netflix.ribbon.proxy.sample;
/**
* @author Tomasz Bak
*/
public class Movie {
}
package com.netflix.ribbon.proxy.sample;
import com.netflix.ribbon.RibbonRequest;
import com.netflix.ribbon.proxy.annotation.*;
import com.netflix.ribbon.proxy.annotation.ClientProperties.Property;
import com.netflix.ribbon.proxy.annotation.Http.Header;
import com.netflix.ribbon.proxy.annotation.Http.HttpMethod;
import com.netflix.ribbon.proxy.sample.HystrixHandlers.MovieFallbackHandler;
import com.netflix.ribbon.proxy.sample.HystrixHandlers.SampleHttpResponseValidator;
import io.netty.buffer.ByteBuf;
import rx.Observable;
import java.util.concurrent.atomic.AtomicReference;
import static com.netflix.ribbon.proxy.sample.ResourceGroupClasses.SampleHttpResourceGroup;
/**
* @author Tomasz Bak
*/
public class MovieServiceInterfaces {
@ClientProperties(properties = {
@Property(name="ReadTimeout", value="2000"),
@Property(name="ConnectTimeout", value="1000"),
@Property(name="MaxAutoRetriesNextServer", value="2")
}, exportToArchaius = true)
public static interface SampleMovieService {
@TemplateName("findMovieById")
@Http(
method = HttpMethod.GET,
uri = "/movies/{id}",
headers = {
@Header(name = "X-MyHeader1", value = "value1.1"),
@Header(name = "X-MyHeader1", value = "value1.2"),
@Header(name = "X-MyHeader2", value = "value2")
})
@Hystrix(
cacheKey = "findMovieById/{id}",
validator = SampleHttpResponseValidator.class,
fallbackHandler = MovieFallbackHandler.class)
@CacheProvider(key = "findMovieById_{id}", provider = SampleCacheProviderFactory.class)
RibbonRequest<ByteBuf> findMovieById(@Var("id") String id);
@TemplateName("findRawMovieById")
@Http(method = HttpMethod.GET, uri = "/rawMovies/{id}")
RibbonRequest<ByteBuf> findRawMovieById(@Var("id") String id);
@TemplateName("findMovie")
@Http(method = HttpMethod.GET, uri = "/movies?name={name}&author={author}")
RibbonRequest<ByteBuf> findMovie(@Var("name") String name, @Var("author") String author);
@TemplateName("registerMovie")
@Http(method = HttpMethod.POST, uri = "/movies")
@Hystrix(cacheKey = "registerMovie", fallbackHandler = MovieFallbackHandler.class)
@ContentTransformerClass(MovieTransformer.class)
RibbonRequest<ByteBuf> registerMovie(@Content Movie movie);
@Http(method = HttpMethod.PUT, uri = "/movies/{id}")
@ContentTransformerClass(MovieTransformer.class)
RibbonRequest<ByteBuf> updateMovie(@Var("id") String id, @Content Movie movie);
@Http(method = HttpMethod.PATCH, uri = "/movies/{id}")
@ContentTransformerClass(MovieTransformer.class)
RibbonRequest<ByteBuf> updateMoviePartial(@Var("id") String id, @Content Movie movie);
@TemplateName("registerTitle")
@Http(method = HttpMethod.POST, uri = "/titles")
@Hystrix(cacheKey = "registerTitle", fallbackHandler = MovieFallbackHandler.class)
RibbonRequest<ByteBuf> registerTitle(@Content String title);
@TemplateName("registerByteBufBinary")
@Http(method = HttpMethod.POST, uri = "/binaries/byteBuf")
@Hystrix(cacheKey = "registerByteBufBinary", fallbackHandler = MovieFallbackHandler.class)
RibbonRequest<ByteBuf> registerByteBufBinary(@Content ByteBuf binary);
@TemplateName("registerByteArrayBinary")
@Http(method = HttpMethod.POST, uri = "/binaries/byteArray")
@Hystrix(cacheKey = "registerByteArrayBinary", fallbackHandler = MovieFallbackHandler.class)
RibbonRequest<ByteBuf> registerByteArrayBinary(@Content byte[] binary);
@TemplateName("deleteMovie")
@Http(method = HttpMethod.DELETE, uri = "/movies/{id}")
RibbonRequest<ByteBuf> deleteMovie(@Var("id") String id);
}
public static interface ShortMovieService {
@TemplateName("findMovieById")
@Http(method = HttpMethod.GET, uri = "/movies/{id}")
RibbonRequest<ByteBuf> findMovieById(@Var("id") String id);
@TemplateName("findMovieById")
@Http(method = HttpMethod.GET, uri = "/movies")
RibbonRequest<ByteBuf> findAll();
}
public static interface BrokenMovieService {
@Http(method = HttpMethod.GET)
Movie returnTypeNotRibbonRequest();
Movie missingHttpAnnotation();
@Http(method = HttpMethod.GET)
RibbonRequest<ByteBuf> multipleContentParameters(@Content Movie content1, @Content Movie content2);
}
@ResourceGroup(name = "testResourceGroup")
public static interface SampleMovieServiceWithResourceGroupNameAnnotation {
}
@ResourceGroup(resourceGroupClass = SampleHttpResourceGroup.class)
public static interface SampleMovieServiceWithResourceGroupClassAnnotation {
}
@ResourceGroup(name = "testResourceGroup", resourceGroupClass = SampleHttpResourceGroup.class)
public static interface BrokenMovieServiceWithResourceGroupNameAndClassAnnotation {
}
@ResourceGroup(name = "testResourceGroup")
public static interface TemplateNameDerivedFromMethodName {
@Http(method = HttpMethod.GET, uri = "/template")
RibbonRequest<ByteBuf> myTemplateName();
}
@ResourceGroup(name = "testResourceGroup")
public static interface HystrixOptionalAnnotationValues {
@TemplateName("hystrix1")
@Http(method = HttpMethod.GET, uri = "/hystrix/1")
@Hystrix(cacheKey = "findMovieById/{id}")
RibbonRequest<ByteBuf> hystrixWithCacheKeyOnly();
@TemplateName("hystrix2")
@Http(method = HttpMethod.GET, uri = "/hystrix/2")
@Hystrix(validator = SampleHttpResponseValidator.class)
RibbonRequest<ByteBuf> hystrixWithValidatorOnly();
@TemplateName("hystrix3")
@Http(method = HttpMethod.GET, uri = "/hystrix/3")
@Hystrix(fallbackHandler = MovieFallbackHandler.class)
RibbonRequest<ByteBuf> hystrixWithFallbackHandlerOnly();
}
@ResourceGroup(name = "testResourceGroup")
public static interface PostsWithDifferentContentTypes {
@TemplateName("rawContentSource")
@Http(method = HttpMethod.POST, uri = "/content/rawContentSource")
@ContentTransformerClass(MovieTransformer.class)
RibbonRequest<ByteBuf> postwithRawContentSource(AtomicReference<Object> arg1, int arg2, @Content Observable<Movie> movie);
@TemplateName("byteBufContent")
@Http(method = HttpMethod.POST, uri = "/content/byteBufContent")
RibbonRequest<ByteBuf> postwithByteBufContent(@Content ByteBuf byteBuf);
@TemplateName("byteArrayContent")
@Http(method = HttpMethod.POST, uri = "/content/byteArrayContent")
RibbonRequest<ByteBuf> postwithByteArrayContent(@Content byte[] bytes);
@TemplateName("stringContent")
@Http(method = HttpMethod.POST, uri = "/content/stringContent")
RibbonRequest<ByteBuf> postwithStringContent(@Content String content);
@TemplateName("movieContent")
@Http(method = HttpMethod.POST, uri = "/content/movieContent")
@ContentTransformerClass(MovieTransformer.class)
RibbonRequest<ByteBuf> postwithMovieContent(@Content Movie movie);
@TemplateName("movieContentBroken")
@Http(method = HttpMethod.POST, uri = "/content/movieContentBroken")
RibbonRequest<ByteBuf> postwithMovieContentBroken(@Content Movie movie);
}
}
/*
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.ribbon.proxy.sample;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.reactivex.netty.channel.ContentTransformer;
/**
* @author Tomasz Bak
*/
public class MovieTransformer implements ContentTransformer<MovieTransformer> {
@Override
public ByteBuf call(MovieTransformer toTransform, ByteBufAllocator byteBufAllocator) {
return null;
}
}
package com.netflix.ribbon.proxy.sample;
import com.netflix.ribbon.http.HttpResourceGroup;
/**
* @author Tomasz Bak
*/
public class ResourceGroupClasses {
public static class SampleHttpResourceGroup extends HttpResourceGroup {
public SampleHttpResourceGroup() {
super("myTestGroup");
}
}
}
/*
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.ribbon.proxy.sample;
import com.netflix.ribbon.CacheProvider;
import com.netflix.ribbon.CacheProviderFactory;
import rx.Observable;
import java.util.Map;
/**
* @author Tomasz Bak
*/
public class SampleCacheProviderFactory implements CacheProviderFactory<Object> {
@Override
public CacheProvider<Object> createCacheProvider() {
return new SampleCacheProvider();
}
public static class SampleCacheProvider implements CacheProvider<Object> {
@Override
public Observable<Object> get(String key, Map requestProperties) {
return null;
}
}
}
......@@ -15,6 +15,7 @@ dependencies {
testCompile 'commons-io:commons-io:2.0.1'
testCompile "com.sun.jersey:jersey-server:${jersey_version}"
testCompile 'com.google.mockwebserver:mockwebserver:20130505'
testCompile 'com.fasterxml.jackson.core:jackson-databind:2.4.3'
testCompile project(':ribbon-archaius')
testCompile project(":ribbon-loadbalancer").sourceSets.test.output
}
......@@ -2,7 +2,7 @@ package com.netflix.loadbalancer;
/**
* Defines the strategy, used to ping all servers, registered in
* <c>com.netflix.loadbalancer.BaseLoadBalancer</c>. You would
* <b>com.netflix.loadbalancer.BaseLoadBalancer</b>. You would
* typically create custom implementation of this interface, if you
* want your servers to be pinged in parallel. <b>Please note,
* that implementations of this interface should be immutable.</b>
......
......@@ -28,7 +28,7 @@ import java.util.concurrent.atomic.AtomicInteger;
* The most well known and basic load balancing strategy, i.e. Round Robin Rule.
*
* @author stonse
* @author Nikos Michalakis <nikos@netflix.com>
* @author <a href="mailto:nikos@netflix.com">Nikos Michalakis</a>
*
*/
public class RoundRobinRule extends AbstractLoadBalancerRule {
......
......@@ -49,7 +49,7 @@ import com.netflix.servo.monitor.Stopwatch;
*
* <ul>
* <li>Choose a server</li>
* <li>Invoke the {@link #call(com.netflix.loadbalancer.Server)} method</li>
* <li>Invoke the {@link com.netflix.loadbalancer.Server} onSubscribe call method</li>
* <li>Invoke the {@link ExecutionListener} if any</li>
* <li>Retry on exception, controlled by {@link com.netflix.client.RetryHandler}</li>
* <li>Provide feedback to the {@link com.netflix.loadbalancer.LoadBalancerStats}</li>
......
......@@ -6,6 +6,7 @@ dependencies {
compile "io.reactivex:rxnetty:${rx_netty_version}"
compile "io.reactivex:rxnetty-contexts:${rx_netty_version}"
compile "io.reactivex:rxnetty-servo:${rx_netty_version}"
compile "io.netty:netty-codec-http:4.0.27.Final"
compile 'javax.inject:javax.inject:1'
compile "org.slf4j:slf4j-api:${slf4j_version}"
compile "com.google.guava:guava:${guava_version}"
......
......@@ -219,8 +219,7 @@ public abstract class LoadBalancingRxClient<I, O, T extends RxClient<I, O>> impl
/**
* Look up the client associated with this Server.
* @param host
* @param port
* @param server
* @return
*/
protected T getOrCreateRxClient(Server server) {
......
......@@ -141,7 +141,7 @@ public class LoadBalancingHttpClient<I, O> extends LoadBalancingRxClientWithPool
* be called for responses with status code 4xx or 5xx
*
* Parameters to the function are
* * HttpClientResponse<O> - The actual response
* * HttpClientResponse - The actual response
* * Integer - Backoff to apply if this is a retryable error. The backoff amount is in milliseconds
* and is based on the configured BackoffStrategy. It is the responsibility of this function
* to implement the actual backoff mechanism. This can be done as Observable.error(e).delay(backoff, TimeUnit.MILLISECONDS)
......@@ -161,7 +161,7 @@ public class LoadBalancingHttpClient<I, O> extends LoadBalancingRxClientWithPool
* The default implementation is non random exponential backoff with time interval configurable
* via the property BackoffInterval (default 1000 msec)
*
* @param BackoffStrategy
* @param backoffStrategy
*/
public Builder<I, O> withBackoffStrategy(Func1<Integer, Integer> backoffStrategy) {
this.backoffStrategy = backoffStrategy;
......@@ -293,7 +293,6 @@ public class LoadBalancingHttpClient<I, O> extends LoadBalancingRxClientWithPool
/**
* Convert an HttpClientRequest to a ServerOperation
*
* @param server
* @param request
* @param rxClientConfig
* @return
......
apply plugin: 'nebula-test-jar'
apply plugin: 'nebula-facet'
apply plugin: 'nebula.facet'
facets {
examples {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册