diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/AbstractLoadBalancer.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/AbstractLoadBalancer.java index 6cfe03a4dc7bd0a5435ed9ce20dd2c8dd1f34539..85d1895949f5e104d413d92429f2710a4b8835cb 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/AbstractLoadBalancer.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/AbstractLoadBalancer.java @@ -1,12 +1,27 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.List; - import com.netflix.niws.client.IClientConfigAware; /** - * AbstractLoadBalancer that captures all the operations and methods needed - * from a load balancer point of view. + * AbstractLoadBalancer that contains the base common features * * @author stonse * diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/BaseLoadBalancer.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/BaseLoadBalancer.java index a4f9c0f3e04b83dea209ce8dde326b46e4c518af..d1f13465d51bc525dedcb5a3add7f7e3db07d1c9 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/BaseLoadBalancer.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/BaseLoadBalancer.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.ArrayList; @@ -10,15 +27,16 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.netflix.niws.client.AbstractNIWSLoadBalancerPing; import com.netflix.niws.client.AbstractNIWSLoadBalancerRule; +import com.netflix.niws.client.ClientFactory; import com.netflix.niws.client.CommonClientConfigKey; import com.netflix.niws.client.IClientConfig; import com.netflix.niws.client.IClientConfigAware; -import com.netflix.niws.client.ClientFactory; import com.netflix.niws.client.NIWSClientException; import com.netflix.niws.client.PrimeConnections; import com.netflix.servo.annotations.DataSourceType; diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/DummyPing.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/DummyPing.java index 485d8fa5e7689af9697ca8601dc1fd196a528781..6ad2c03187c2f419a1cfcc17cb06582d9ea898ae 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/DummyPing.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/DummyPing.java @@ -1,8 +1,24 @@ +/* +* +* Copyright 2013 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.loadbalancer; import com.netflix.niws.client.AbstractNIWSLoadBalancerPing; import com.netflix.niws.client.IClientConfig; -import com.netflix.niws.client.IClientConfigAware; /** * Default simple implementation diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/ILoadBalancer.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/ILoadBalancer.java index 80fd0ab0ebe733394d2dff1ba585be4a1caeca86..02fb267af0ffa5f564522206756768f6203dbdbf 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/ILoadBalancer.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/ILoadBalancer.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.List; diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/IPing.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/IPing.java index 2e41acb7a775346f82261fa5ec7b5b0acb823535..1e5a1b46e03647ab11af6cfa0e1400d095b4a4b5 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/IPing.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/IPing.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; /** diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/IRule.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/IRule.java index bf575a278b9f34bbd84541a2387a095846dcd060..8a68565ba7992eb21c9a5e34010cbb5a33bdcee8 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/IRule.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/IRule.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; public interface IRule{ diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/InterruptTask.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/InterruptTask.java index 0b46a1b706636f454cc5ce177f8fa5241dbe8fd9..228f789ad4ea98c2540e5acb4c013e4556435ab4 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/InterruptTask.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/InterruptTask.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.Timer; diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/LoadBalancerStats.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/LoadBalancerStats.java index 95fa8ea73f45698354699a06480cab6936da1b3e..0102d2d05313ea0b76088e0a09c480e663771d64 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/LoadBalancerStats.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/LoadBalancerStats.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.ArrayList; @@ -23,7 +40,7 @@ import com.netflix.servo.annotations.Monitor; import com.netflix.servo.monitor.Monitors; /** - * Utility class that can be used to store loadbalancer stats such as Failure counts per server etc. + * Utility class that can be used to store loadbalancer stats such as Failure counts per server * @author stonse * */ diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/NoOpLoadBalancer.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/NoOpLoadBalancer.java index 3cda227fee48504d3c3ad778064393a1a7e3e1a1..e4cdb8f7698fc24ef6de8cb9b8ab2c84f2ff44c3 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/NoOpLoadBalancer.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/NoOpLoadBalancer.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.Collections; @@ -6,8 +23,6 @@ import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.netflix.niws.client.IClientConfig; - /** * A noOp Loadbalancer * i.e. doesnt do anything "loadbalancer like" diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/NoOpPing.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/NoOpPing.java index fe5dd63a0c8b899b60b2604586486aa4455d3f8d..ee8d657d664f1c423268b4a42515e25239797c0b 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/NoOpPing.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/NoOpPing.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; /** diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/PingConstant.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/PingConstant.java index 6fac2541349ec30627253cd6520f2fac465c9c2c..cd323e5c9dbcb957592bbf8f10e36bd86e215cdb 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/PingConstant.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/PingConstant.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; /** diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/RandomRule.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/RandomRule.java index d79cebbaa0084cd2304405fd971392d4699a8431..25cf774fe6f5a75857828a1ac5d70d9ef2495ad9 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/RandomRule.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/RandomRule.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.Random; diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/ResponseTimeWeightedRule.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/ResponseTimeWeightedRule.java index 07dd971ab213ff9c453dbc41fdff68d729ff2642..d13f35547b10fbdd18b0997a78eddaa223336b4d 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/ResponseTimeWeightedRule.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/ResponseTimeWeightedRule.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.ArrayList; @@ -34,7 +51,7 @@ import org.slf4j.LoggerFactory; * else if (random_number between 41 & 80) {send request to C;} * else if (random_number between 81 & 100) {send request to D;} * - * @author Sudhir Tonse (stonse@netflix.com) + * @author stonse */ public class ResponseTimeWeightedRule implements IRule { diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/RetryRule.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/RetryRule.java index 5d40d0e37f6b9aad69f405b5b71bd9fb33c5a736..7ae89088ef03140a9f7dcd22b483f9b280b2cf44 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/RetryRule.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/RetryRule.java @@ -1,6 +1,22 @@ +/* +* +* Copyright 2013 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.loadbalancer; -import java.util.LinkedList; public class RetryRule implements IRule { IRule subRule = new RoundRobinRule(); diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/RoundRobinRule.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/RoundRobinRule.java index f4a5298116b06d19e1dc809ed4ac06ff85762f36..739077c45f0ecb9353d73f5830352221232d65c2 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/RoundRobinRule.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/RoundRobinRule.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.concurrent.atomic.AtomicInteger; diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/Server.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/Server.java index a5e054d3126b9a4510c1e4a6db818bbc4e21f18f..4e56d68c767d4753c3bf991f9e476f3c34c5cac3 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/Server.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/Server.java @@ -1,6 +1,28 @@ +/* +* +* Copyright 2013 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.loadbalancer; - +/** + * Class that represents a typical Server i.e. a Host:port identifier + * + * @author stonse + * + */ public class Server { public static final String UNKNOWN_ZONE = "UNKNOWN"; diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerComparator.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerComparator.java index 316821a8a92231169873cb0be8efe8b8633ea745..082a0c46592d2fc0c99884de7f7421cdc09b6ba5 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerComparator.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerComparator.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.io.Serializable; diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerList.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerList.java index c5c6b677b179fcafba8881078da1aff043169c00..1b1fdc824a2c9c9dbd15a4d6ecb10e650d41f05c 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerList.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerList.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.List; diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerListFilter.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerListFilter.java index 7e53b3d8044881a9a24ab4a702fc5bbfbc30392b..9017b5213ea64c5b8b1e2055d50c4fbbe1edd9b7 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerListFilter.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerListFilter.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.List; diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerStats.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerStats.java index 8cb61c77bea3471d6e7602582513496429fe41d0..6b2076b3accf030637e9e213ead6ecbcc61bd669 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerStats.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/ServerStats.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.util.Date; diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/ZoneSnapshot.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/ZoneSnapshot.java index 8d6213158a0354ebf47d5791745c3af35ffe1edb..70ba40505cdde068595b72b7d22b0e49e30d53a8 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/ZoneSnapshot.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/ZoneSnapshot.java @@ -1,5 +1,27 @@ +/* +* +* Copyright 2013 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.loadbalancer; +/** + * Captures the metrics on a Per Zone basis (Zone is modeled after the Amazon Availability Zone) + * @author awang + * + */ public class ZoneSnapshot { final int instanceCount; final double loadPerServer; diff --git a/ribbon-core/src/main/java/com/netflix/loadbalancer/ZoneStats.java b/ribbon-core/src/main/java/com/netflix/loadbalancer/ZoneStats.java index f635fe94401b376aa0797bf557d100f9abf18036..6af7df5afd9b6ad18ffccb3405dddeb7d2306160 100644 --- a/ribbon-core/src/main/java/com/netflix/loadbalancer/ZoneStats.java +++ b/ribbon-core/src/main/java/com/netflix/loadbalancer/ZoneStats.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import com.netflix.servo.annotations.DataSourceType; diff --git a/ribbon-core/src/main/java/com/netflix/niws/SimpleVipAddressResolver.java b/ribbon-core/src/main/java/com/netflix/niws/SimpleVipAddressResolver.java index 9e7674b8f874c982ef07a79d1e57e14a350c3838..e3787de751b2f76c63183689b0c5b704470e5ea2 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/SimpleVipAddressResolver.java +++ b/ribbon-core/src/main/java/com/netflix/niws/SimpleVipAddressResolver.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws; import java.util.regex.Pattern; diff --git a/ribbon-core/src/main/java/com/netflix/niws/VipAddressResolver.java b/ribbon-core/src/main/java/com/netflix/niws/VipAddressResolver.java index c11b24246b556662de60438d5a1ecc41cc9ef845..fa88328fb2e8c745b300b1ed18a7b1839ebec2bf 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/VipAddressResolver.java +++ b/ribbon-core/src/main/java/com/netflix/niws/VipAddressResolver.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws; import com.netflix.niws.client.IClientConfig; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/AbstractLoadBalancerAwareClient.java b/ribbon-core/src/main/java/com/netflix/niws/client/AbstractLoadBalancerAwareClient.java index 5b564e08b2ce1dd21967889e105e79677ed858cc..d15aa2440198024a692602b39c6010dff00db089 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/AbstractLoadBalancerAwareClient.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/AbstractLoadBalancerAwareClient.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.net.URI; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSLoadBalancerPing.java b/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSLoadBalancerPing.java index 047199c128473715258744fbc0706ff6391723fb..56c2c67179d56d90b593ccf91ee4caceda118b58 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSLoadBalancerPing.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSLoadBalancerPing.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import com.netflix.loadbalancer.AbstractLoadBalancer; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSLoadBalancerRule.java b/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSLoadBalancerRule.java index 6fd1b54c0441a21f14dd43fad64dd2e86f221721..3fc1e0515347b5fc68e14794a44a7a6ff8d4cb3b 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSLoadBalancerRule.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSLoadBalancerRule.java @@ -1,8 +1,25 @@ +/* +* +* Copyright 2013 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.niws.client; import com.netflix.loadbalancer.AbstractLoadBalancer; -import com.netflix.loadbalancer.IRule; import com.netflix.loadbalancer.BaseLoadBalancer; +import com.netflix.loadbalancer.IRule; import com.netflix.loadbalancer.Server; public abstract class AbstractNIWSLoadBalancerRule implements IRule, IClientConfigAware { diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSServerList.java b/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSServerList.java index a81a52b745f51364e38c87b1827768e1f69c6541..2f6ede03841bbdd6419cc3507b011eec26e66da4 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSServerList.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSServerList.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.util.List; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSServerListFilter.java b/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSServerListFilter.java index f89b0611a13f80233a5d623c2a996436bc0159ad..abe505fa3d296d5c8c448550b36a7721ed177ccc 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSServerListFilter.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/AbstractNIWSServerListFilter.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import com.netflix.loadbalancer.LoadBalancerStats; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/AvailabilityFilteringRule.java b/ribbon-core/src/main/java/com/netflix/niws/client/AvailabilityFilteringRule.java index 60014bd6ae54c296e060eb3dbba6f18faac6ff0d..e2b5047d42f8bd78e8bf07256dd63a6e297f7a42 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/AvailabilityFilteringRule.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/AvailabilityFilteringRule.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import com.netflix.config.DynamicBooleanProperty; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/ClientFactory.java b/ribbon-core/src/main/java/com/netflix/niws/client/ClientFactory.java index b159de170c2568805d3d79883c3436373a7db0b7..e7f1e41b47ee4692a261f43314bf533ad41cd763 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/ClientFactory.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/ClientFactory.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.util.Map; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/ClientRequest.java b/ribbon-core/src/main/java/com/netflix/niws/client/ClientRequest.java index 27179a9ed347a1ea354de8e12d7ede7548e6deaf..6acef64522b1dd8ba6b2a02b07b8230e55e79ca1 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/ClientRequest.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/ClientRequest.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.net.URI; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/ClientSslSocketFactoryException.java b/ribbon-core/src/main/java/com/netflix/niws/client/ClientSslSocketFactoryException.java index bed80274b89d665a0638b9ad0a2d3403baf7163c..1b59dfc282f16465baffff7f1551b17a3ce12a3d 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/ClientSslSocketFactoryException.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/ClientSslSocketFactoryException.java @@ -1,6 +1,20 @@ -/** - * Copyright (c) 2011 Netflix, Inc. All rights reserved. - */ +/* +* +* Copyright 2013 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.niws.client; /** diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/CommonClientConfigKey.java b/ribbon-core/src/main/java/com/netflix/niws/client/CommonClientConfigKey.java index a04b3e2fffe10fe204279011386da9ed42031067..f907ed1a520d5ac797ff47eedf765e7dcd44e93f 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/CommonClientConfigKey.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/CommonClientConfigKey.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; public enum CommonClientConfigKey implements IClientConfigKey { diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/DynamicServerListLoadBalancer.java b/ribbon-core/src/main/java/com/netflix/niws/client/DynamicServerListLoadBalancer.java index 4af963b5ac8546e685a3f71f6a7810990ca1cc5c..e00f7433863da1ca02e2bd3ba3f2ebe374a0183f 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/DynamicServerListLoadBalancer.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/DynamicServerListLoadBalancer.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.util.ArrayList; @@ -13,13 +30,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.netflix.client.config.DefaultClientConfigImpl; +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import com.netflix.loadbalancer.BaseLoadBalancer; import com.netflix.loadbalancer.IPing; import com.netflix.loadbalancer.IRule; -import com.netflix.loadbalancer.BaseLoadBalancer; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerList; import com.netflix.loadbalancer.ServerListFilter; -import com.google.common.util.concurrent.ThreadFactoryBuilder; /** * A default easy to use LoadBalancer that uses Discovery Client as its Ping diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/IClient.java b/ribbon-core/src/main/java/com/netflix/niws/client/IClient.java index c3c9109d266db6ee5e12d57462b6efd9c6eb5fb5..dda0aadb1b5347395c572b6ba7bcdb3bb5afa50c 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/IClient.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/IClient.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfig.java b/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfig.java index d03c778545da16836e87a866f740d7412e037d4d..7914419e3561a7d4dfba636d280a5ecf69b54af1 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfig.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfig.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.util.Map; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfigAware.java b/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfigAware.java index a9f6d802e9d539a74075d505c95adbefd72d7b54..742b4b6f1da3fa683e1501bb347dc668ce51a70a 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfigAware.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfigAware.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; /** diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfigKey.java b/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfigKey.java index 758229aa5a870d66ec982ba12466cbee5c49cdc4..d0e94deb6c87d12ffbf181c2df33746da38c4b60 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfigKey.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/IClientConfigKey.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; public interface IClientConfigKey { diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/IPrimeConnection.java b/ribbon-core/src/main/java/com/netflix/niws/client/IPrimeConnection.java index bc87ff9b45e508d8a907ff85b5c8ab36dc916d2d..969cb8dd3a17bdfe8eca98fb8ba1cdd019213105 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/IPrimeConnection.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/IPrimeConnection.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import com.netflix.loadbalancer.Server; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/IResponse.java b/ribbon-core/src/main/java/com/netflix/niws/client/IResponse.java index 5d465da264198b2bd61bb443d1f34f14e806b3ff..0b5d6feb519a8a71c0c33a306bc79a265adcc1ef 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/IResponse.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/IResponse.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.net.URI; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/NIWSClientException.java b/ribbon-core/src/main/java/com/netflix/niws/client/NIWSClientException.java index b9de16e019fe38aacde49feee7a34a9aea5eddb1..7914325235bd055642ab915e1313cfb837c5426d 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/NIWSClientException.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/NIWSClientException.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.lang.reflect.Field; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/NIWSRoundRobinRule.java b/ribbon-core/src/main/java/com/netflix/niws/client/NIWSRoundRobinRule.java index b37b536c245aad9a918ad92ee7c009bfa3d01b39..d0b5fc3e41e67a1ef94981583e9ecd3cb085d3fc 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/NIWSRoundRobinRule.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/NIWSRoundRobinRule.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import com.netflix.loadbalancer.BaseLoadBalancer; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/NIWSWeightedResponseTimeRule.java b/ribbon-core/src/main/java/com/netflix/niws/client/NIWSWeightedResponseTimeRule.java index 281e8d1de05cdbe84af2bd91990b7b74d3216fbf..e130898a1109b7ad0fe0026b8b5ea1f9c0ee2160 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/NIWSWeightedResponseTimeRule.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/NIWSWeightedResponseTimeRule.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import com.netflix.loadbalancer.AbstractLoadBalancer; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/PrimeConnections.java b/ribbon-core/src/main/java/com/netflix/niws/client/PrimeConnections.java index 1b358bd211505d20d15361abef770df26247bedc..cf1e37372a1a0d44b7a531afd4d838cc474d0537 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/PrimeConnections.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/PrimeConnections.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.util.ArrayList; @@ -25,10 +42,10 @@ import com.netflix.servo.monitor.Stopwatch; import com.netflix.servo.monitor.Timer; /** - * Prime the Http Connections for a given RestClient (Of course for those - * RestClient that have a LoadBalancer that knows the set of Servers it will - * connect to) This is mainly done to address those deployment environments - * (Read EC2) which have slow firewall connection/path set up + * Prime the Http Connections for a given RestClient (For those RestClient that + * have a LoadBalancer that knows the set of Servers it will connect to) This is + * mainly done to address those deployment environments (Read EC2) which benefit + * from a firewall connection/path warmup prior to actual use for live requests * * @author stonse * diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/ZoneAvoidanceRule.java b/ribbon-core/src/main/java/com/netflix/niws/client/ZoneAvoidanceRule.java index cbf0d1c525fca4f67b5676ce4c504198710fae9e..a43e6340477c6bf3d412703ea518fcebe67f97a5 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/ZoneAvoidanceRule.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/ZoneAvoidanceRule.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.util.HashMap; diff --git a/ribbon-core/src/main/java/com/netflix/niws/client/ZoneAwareNIWSDiscoveryLoadBalancer.java b/ribbon-core/src/main/java/com/netflix/niws/client/ZoneAwareNIWSDiscoveryLoadBalancer.java index b5d998f1bbbec6a146dc5167b943e2c1f57ab17c..66158d590ee2cd6c31ee96752f4bd608364c0301 100644 --- a/ribbon-core/src/main/java/com/netflix/niws/client/ZoneAwareNIWSDiscoveryLoadBalancer.java +++ b/ribbon-core/src/main/java/com/netflix/niws/client/ZoneAwareNIWSDiscoveryLoadBalancer.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.util.HashMap; @@ -9,21 +26,21 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import com.netflix.config.DynamicBooleanProperty; import com.netflix.config.DynamicDoubleProperty; import com.netflix.config.DynamicPropertyFactory; +import com.netflix.loadbalancer.BaseLoadBalancer; import com.netflix.loadbalancer.IRule; import com.netflix.loadbalancer.LoadBalancerStats; -import com.netflix.loadbalancer.BaseLoadBalancer; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ZoneSnapshot; import com.netflix.servo.monitor.Monitors; import com.netflix.servo.monitor.Stopwatch; import com.netflix.servo.monitor.Timer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - public class ZoneAwareNIWSDiscoveryLoadBalancer extends DynamicServerListLoadBalancer { private ConcurrentHashMap balancers = new ConcurrentHashMap(); diff --git a/ribbon-core/src/test/java/com/netflix/loadbalancer/RandomLBTest.java b/ribbon-core/src/test/java/com/netflix/loadbalancer/RandomLBTest.java index 2338e23edbd9176629ae8aa6f8f14f67414f3f10..7b3a0af5646294264fea195f18579e844bc11ca2 100644 --- a/ribbon-core/src/test/java/com/netflix/loadbalancer/RandomLBTest.java +++ b/ribbon-core/src/test/java/com/netflix/loadbalancer/RandomLBTest.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import static org.junit.Assert.*; diff --git a/ribbon-core/src/test/java/com/netflix/loadbalancer/SimpleRoundRobinLBTest.java b/ribbon-core/src/test/java/com/netflix/loadbalancer/SimpleRoundRobinLBTest.java index 06f1203aa0a5a46b675b6a6f638e484090a06ca7..2014fae3905a6b781a23e14a1ac2046413b1ad84 100644 --- a/ribbon-core/src/test/java/com/netflix/loadbalancer/SimpleRoundRobinLBTest.java +++ b/ribbon-core/src/test/java/com/netflix/loadbalancer/SimpleRoundRobinLBTest.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; diff --git a/ribbon-core/src/test/java/com/netflix/loadbalancer/SimpleRoundRobinWithRetryLBTest.java b/ribbon-core/src/test/java/com/netflix/loadbalancer/SimpleRoundRobinWithRetryLBTest.java index 0722e692f54bb210841e7a2d9ad7a72f6e6d7e2d..2342a5104c1db98b92d111fcba3f2d670c38fed3 100644 --- a/ribbon-core/src/test/java/com/netflix/loadbalancer/SimpleRoundRobinWithRetryLBTest.java +++ b/ribbon-core/src/test/java/com/netflix/loadbalancer/SimpleRoundRobinWithRetryLBTest.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; diff --git a/ribbon-core/src/test/java/com/netflix/niws/client/NiwsClientConfigTest.java b/ribbon-core/src/test/java/com/netflix/niws/client/NiwsClientConfigTest.java index 84168931fe2cfc039408ee065d99ba75850163be..10fba8c1720cd2b72f827b91d4c7af0e79d07898 100644 --- a/ribbon-core/src/test/java/com/netflix/niws/client/NiwsClientConfigTest.java +++ b/ribbon-core/src/test/java/com/netflix/niws/client/NiwsClientConfigTest.java @@ -1,3 +1,20 @@ +/*s +* +* Copyright 2013 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.niws.client; import static org.junit.Assert.*; @@ -13,8 +30,7 @@ import org.junit.Test; import java.util.Properties; /** - * Unit Test case for the NIWS Rest Client We use the DiscoveryPing and - * RoundRobin LoadBalancer for this purpose + * Test cases to verify the correctness of the Client Configuration settings * * @author stonse * diff --git a/ribbon-core/src/test/java/com/netflix/niws/client/ServerListLoabBalancerTest.java b/ribbon-core/src/test/java/com/netflix/niws/client/ServerListLoabBalancerTest.java index 4af346b3feda484a46638e557363e76c5126756b..3a0406fdcd5fd241bf34c2f3cd5e34439cf89dfe 100644 --- a/ribbon-core/src/test/java/com/netflix/niws/client/ServerListLoabBalancerTest.java +++ b/ribbon-core/src/test/java/com/netflix/niws/client/ServerListLoabBalancerTest.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import static org.junit.Assert.*; diff --git a/ribbon-core/src/test/java/com/netflix/niws/client/ZoneAwareNIWSDiscoveryLoadBalancerTest.java b/ribbon-core/src/test/java/com/netflix/niws/client/ZoneAwareNIWSDiscoveryLoadBalancerTest.java index e361326dccb6e52935e67501cf11a9af4f3e35fc..dab2fc9a540ae4729a3f840d6863d83c2be999ef 100644 --- a/ribbon-core/src/test/java/com/netflix/niws/client/ZoneAwareNIWSDiscoveryLoadBalancerTest.java +++ b/ribbon-core/src/test/java/com/netflix/niws/client/ZoneAwareNIWSDiscoveryLoadBalancerTest.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.util.ArrayList; diff --git a/ribbon-eureka/src/main/java/com/netflix/niws/client/DefaultNIWSServerListFilter.java b/ribbon-eureka/src/main/java/com/netflix/niws/client/DefaultNIWSServerListFilter.java index e175fbabcc16797268c74fced19c7905ae45439e..288b1245b34880ca2e59a9a144f769a36c3799ac 100644 --- a/ribbon-eureka/src/main/java/com/netflix/niws/client/DefaultNIWSServerListFilter.java +++ b/ribbon-eureka/src/main/java/com/netflix/niws/client/DefaultNIWSServerListFilter.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.util.ArrayList; diff --git a/ribbon-eureka/src/main/java/com/netflix/niws/client/DiscoveryEnabledNIWSServerList.java b/ribbon-eureka/src/main/java/com/netflix/niws/client/DiscoveryEnabledNIWSServerList.java index 4a33bd55b344472f2c7578180c06faf03f82957e..b62fa68df29e42da422e6ee5a99c02f2a7a89f22 100644 --- a/ribbon-eureka/src/main/java/com/netflix/niws/client/DiscoveryEnabledNIWSServerList.java +++ b/ribbon-eureka/src/main/java/com/netflix/niws/client/DiscoveryEnabledNIWSServerList.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import java.util.ArrayList; diff --git a/ribbon-eureka/src/main/java/com/netflix/niws/client/DiscoveryEnabledServer.java b/ribbon-eureka/src/main/java/com/netflix/niws/client/DiscoveryEnabledServer.java index eaf3cd6df47f6d96d4365c3fdbb98b0352dfd81f..fd0e01ac96313481ae52e91c9e3d48255a5f32cc 100644 --- a/ribbon-eureka/src/main/java/com/netflix/niws/client/DiscoveryEnabledServer.java +++ b/ribbon-eureka/src/main/java/com/netflix/niws/client/DiscoveryEnabledServer.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; diff --git a/ribbon-eureka/src/main/java/com/netflix/niws/client/NIWSDiscoveryPing.java b/ribbon-eureka/src/main/java/com/netflix/niws/client/NIWSDiscoveryPing.java index 848f21410b88c6a348abb261708860beb0c9d108..499ba5014aa6e02051ff8cf77d0bf74e09a0482a 100644 --- a/ribbon-eureka/src/main/java/com/netflix/niws/client/NIWSDiscoveryPing.java +++ b/ribbon-eureka/src/main/java/com/netflix/niws/client/NIWSDiscoveryPing.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; diff --git a/ribbon-eureka/src/test/java/com/netflix/niws/client/DefaultNIWSServerListFilterTest.java b/ribbon-eureka/src/test/java/com/netflix/niws/client/DefaultNIWSServerListFilterTest.java index ef42eae64c5eb94fb7ad8dbb649fa86ebb582f39..42171687e89ad8ee22358384053482dcf9ea60e0 100644 --- a/ribbon-eureka/src/test/java/com/netflix/niws/client/DefaultNIWSServerListFilterTest.java +++ b/ribbon-eureka/src/test/java/com/netflix/niws/client/DefaultNIWSServerListFilterTest.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client; import static org.junit.Assert.*; diff --git a/ribbon-httpclient/src/main/java/com/netflix/http4/ConnectionPoolCleaner.java b/ribbon-httpclient/src/main/java/com/netflix/http4/ConnectionPoolCleaner.java index 38365bdd4ff725a2b6ce57e67b833b166e14a48e..e1f5debd5d51b4b6d8bcf90518a6bf9488cbf990 100644 --- a/ribbon-httpclient/src/main/java/com/netflix/http4/ConnectionPoolCleaner.java +++ b/ribbon-httpclient/src/main/java/com/netflix/http4/ConnectionPoolCleaner.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.http4; import java.util.Timer; diff --git a/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClient.java b/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClient.java index 10dc42805640ed98ba50bd8651a2084f01805f83..0a3be12031564c113dbcb454fc87bf8018bf234e 100644 --- a/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClient.java +++ b/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClient.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.http4; import java.io.IOException; @@ -37,8 +54,7 @@ import com.netflix.servo.monitor.Timer; /** * Netflix extension of Apache 4.0 HttpClient * Just so we can wrap around some features. - * Also Apache HttpClient's connection pooling is per instance of - * HttpClient - and hence we want all applications should + * * @author stonse * */ diff --git a/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClientConstants.java b/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClientConstants.java index 55f69d966cc8b20939e4fc9907c2961a0e327331..02394c0af34ceda4ad04a05d09035a8d6ffc2dfb 100644 --- a/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClientConstants.java +++ b/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClientConstants.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.http4; public class NFHttpClientConstants { diff --git a/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClientFactory.java b/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClientFactory.java index 6190a4c075ec9897a7766e1c1153c8a2bdf79eee..76ffbc93ac7cf60d3284606697162a149655de73 100644 --- a/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClientFactory.java +++ b/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpClientFactory.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.http4; import java.util.Map; diff --git a/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpMethodRetryHandler.java b/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpMethodRetryHandler.java index 71c6479c32c911e2f45cf763cb618f60851802d0..e0920426a5777c46c4a1618ffc32fcd563d4feb5 100644 --- a/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpMethodRetryHandler.java +++ b/ribbon-httpclient/src/main/java/com/netflix/http4/NFHttpMethodRetryHandler.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.http4; /** diff --git a/ribbon-httpclient/src/main/java/com/netflix/loadbalancer/PingUrl.java b/ribbon-httpclient/src/main/java/com/netflix/loadbalancer/PingUrl.java index 40a7b893c70bf123c11c20abd098ecab7c279c8a..ff4308f3a3a574cd1c5dd3f924945fe1a72e7b47 100644 --- a/ribbon-httpclient/src/main/java/com/netflix/loadbalancer/PingUrl.java +++ b/ribbon-httpclient/src/main/java/com/netflix/loadbalancer/PingUrl.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.loadbalancer; import java.io.IOException; @@ -13,21 +30,20 @@ import org.slf4j.LoggerFactory; /** - * Use this Ping implementation if you want to do a "health check" - * kind of Ping. - * This will be a a "real" ping. As in a real http/s call is made to this url - * e.g. http://ec2-75-101-231-85.compute-1.amazonaws.com:7101/cs/hostRunning + * Ping implementation if you want to do a "health check" kind of Ping. This + * will be a "real" ping. As in a real http/s call is made to this url e.g. + * http://ec2-75-101-231-85.compute-1.amazonaws.com:7101/cs/hostRunning * - * Some services/clients choose PingDiscovery - which is quick but is not a real - * ping. As in - it just asks discovery in-memory cache if the server is present in - * its Roster - * PingUrl on the other hand, makes a real call. This is more expensive - but its the - * "standard" way most VIPs and other services perform HealthChecks. + * Some services/clients choose PingDiscovery - which is quick but is not a real + * ping. i.e It just asks discovery (eureka) in-memory cache if the server is present + * in its Roster PingUrl on the other hand, makes an actual call. This is more + * expensive - but its the "standard" way most VIPs and other services perform + * HealthChecks. * * Choose your Ping based on your needs. * * @author stonse - * + * */ public class PingUrl implements IPing { private static final Logger LOGGER = LoggerFactory.getLogger(PingUrl.class); diff --git a/ribbon-httpclient/src/main/java/com/netflix/niws/cert/AbstractSslContextFactory.java b/ribbon-httpclient/src/main/java/com/netflix/niws/cert/AbstractSslContextFactory.java index d77c45e9526907c62a3c45497497852d12ac935b..46f9b440ec236da8fe2b5c61515d62d59939c077 100644 --- a/ribbon-httpclient/src/main/java/com/netflix/niws/cert/AbstractSslContextFactory.java +++ b/ribbon-httpclient/src/main/java/com/netflix/niws/cert/AbstractSslContextFactory.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.cert; import java.security.KeyManagementException; diff --git a/ribbon-httpclient/src/main/java/com/netflix/niws/client/URLSslContextFactory.java b/ribbon-httpclient/src/main/java/com/netflix/niws/client/URLSslContextFactory.java index ee632d2701eb0ec691d707f2e8dd25b5265c51eb..b2992764be19de9669aa5852c6251d56e3cea0ac 100644 --- a/ribbon-httpclient/src/main/java/com/netflix/niws/client/URLSslContextFactory.java +++ b/ribbon-httpclient/src/main/java/com/netflix/niws/client/URLSslContextFactory.java @@ -23,8 +23,8 @@ import com.netflix.niws.cert.AbstractSslContextFactory; * Secure socket factory that is used the NIWS code if a non-standard key store or trust store * is specified. * - * @author dyuan@netflix.com (Danny Yuan) - Original implementation for AKMS - * @author pstout@netflix.com (Peter D. Stout) - Generalization for use in NIWS code + * @author dyuan@netflix.com (Danny Yuan) + * @author pstout@netflix.com (Peter D. Stout) */ public class URLSslContextFactory extends AbstractSslContextFactory{ private final static Logger LOGGER = LoggerFactory.getLogger(URLSslContextFactory.class); diff --git a/ribbon-httpclient/src/main/java/com/netflix/niws/client/http/HttpClientRequest.java b/ribbon-httpclient/src/main/java/com/netflix/niws/client/http/HttpClientRequest.java index 9b7374aa76fe48b9c6231ee2abafaecef0f65ebd..f10d18adb5a271034c76ae9c3a81838194a55c4d 100644 --- a/ribbon-httpclient/src/main/java/com/netflix/niws/client/http/HttpClientRequest.java +++ b/ribbon-httpclient/src/main/java/com/netflix/niws/client/http/HttpClientRequest.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client.http; import java.net.URI; diff --git a/ribbon-httpclient/src/test/java/com/netflix/http4/NFHttpClientTest.java b/ribbon-httpclient/src/test/java/com/netflix/http4/NFHttpClientTest.java index b04c192f9f5693db354f4a588d9a9303c54865bb..a86076aade25cf5090cc44e4b5f8c886cb5c9466 100644 --- a/ribbon-httpclient/src/test/java/com/netflix/http4/NFHttpClientTest.java +++ b/ribbon-httpclient/src/test/java/com/netflix/http4/NFHttpClientTest.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.http4; import static org.junit.Assert.assertTrue; diff --git a/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/GetPostTest.java b/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/GetPostTest.java index 7b12c664c719c65e263a624c72a548238f511f32..bcac51d9a271d1bfcf7a25e477e6245d025d5c42 100644 --- a/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/GetPostTest.java +++ b/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/GetPostTest.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client.http; import java.io.ByteArrayInputStream; diff --git a/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/RestClientTest.java b/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/RestClientTest.java index 67330b650b245653d738f97554844ae182439970..342c59fb9e2cae99ead2fc99663bacbd216e82e9 100644 --- a/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/RestClientTest.java +++ b/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/RestClientTest.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client.http; diff --git a/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/TestObject.java b/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/TestObject.java index cc8c13bf4cdf3411bb7a103d36ce441b3cd40698..b70fc90f6b96a0a8782cb2779810413d323e8e12 100644 --- a/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/TestObject.java +++ b/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/TestObject.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client.http; import javax.xml.bind.annotation.XmlRootElement; diff --git a/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/TestResource.java b/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/TestResource.java index 3afc23e3033a5ca7063e4102d0f242e05b0c1343..3de502de7c377dc134d239e5c955ce5c94001616 100644 --- a/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/TestResource.java +++ b/ribbon-httpclient/src/test/java/com/netflix/niws/client/http/TestResource.java @@ -1,3 +1,20 @@ +/* +* +* Copyright 2013 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.niws.client.http; import java.io.InputStream;