File tree Expand file tree Collapse file tree 3 files changed +22
-21
lines changed
okhttp-clients/src/main/java/com/palantir/remoting3/okhttp Expand file tree Collapse file tree 3 files changed +22
-21
lines changed Original file line number Diff line number Diff line change 1414 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515 * See the License for the specific language governing permissions and
1616 * limitations under the License.
17- *
18- * Changes made:
19- *
20- * 1. Package was changed.
21- * 2. Fields made private.
22- * 3. Fixed a typo.
2317 */
2418package com .palantir .remoting3 .okhttp ;
2519
2822/**
2923 * Class used to track immutable samples in an AtomicReference.
3024 *
31- * See {@link com.netflix.concurrency.limits.limit.ImmutableSampleWindow}
25+ * Changes made to {@link com.netflix.concurrency.limits.limit.ImmutableSampleWindow}
26+ *
27+ * 1. Package was changed.
28+ * 2. Fields made private.
29+ * 3. Fixed a typo (getAverateRttNanos -> getAverageRttNanos)
3230 */
3331final class ImmutableSampleWindow {
3432 private final long minRtt ;
Original file line number Diff line number Diff line change 1414 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515 * See the License for the specific language governing permissions and
1616 * limitations under the License.
17- *
18- * This limiter has been forked from Netflix's implementation. Changes are:
19- * 1. Palantir license.
20- * 2. Codestyle.
21- * 3. Made package private.
22- * 4. Modified to support a 'timeout', rather than blocking forever.
23- * 5. Renamed to RemotingBlockingLimiter and changed package in order to avoid ambiguity.
2417 */
2518package com .palantir .remoting3 .okhttp ;
2619
3427 * {@link Limiter} that blocks the caller when the limit has been reached. The caller is
3528 * blocked until the limiter has been released. This limiter is commonly used in batch
3629 * clients that use the limiter as a back-pressure mechanism.
30+ *
31+ * This limiter has been forked from Netflix's {@link com.netflix.concurrency.limits.limiter.BlockingLimiter}.
32+ *
33+ * Changes are:
34+ * 1. Modified to support a 'timeout', rather than blocking forever.
35+ * 2. Codestyle.
36+ * 3. Made package private.
37+ * 4. Palantir license.
38+ * 5. Renamed to RemotingBlockingLimiter and changed package in order to avoid ambiguity.
3739 * <p>
3840 * TODO(j-baker): Remove once https://github.com/Netflix/concurrency-limits/pull/78 is merged and released.
3941 */
Original file line number Diff line number Diff line change 1414 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515 * See the License for the specific language governing permissions and
1616 * limitations under the License.
17- *
18- * Changes made from WindowedLimit:
19- *
20- * 1. Change package and make package private.
21- * 2. Code style.
22- * 3. Modify to reduce window size whenever a dropped sample is seen, rather than awaiting the whole window.
23- * 4. Inlined constants.
2417 */
2518package com .palantir .remoting3 .okhttp ;
2619
2922import java .util .concurrent .atomic .AtomicReference ;
3023import java .util .function .Consumer ;
3124
25+ /**
26+ * Changes made from {@link com.netflix.concurrency.limits.limit.WindowedLimit}:
27+ *
28+ * 1. Modify to reduce window size whenever a dropped sample is seen, rather than awaiting the whole window.
29+ * 2. Change package and make package private.
30+ * 3. Code style.
31+ * 4. Inlined constants.
32+ */
3233class RemotingWindowedLimit implements Limit {
3334 private static final long MIN_WINDOW_TIME = TimeUnit .SECONDS .toNanos (1 );
3435 private static final long MAX_WINDOW_TIME = TimeUnit .SECONDS .toNanos (1 );
You can’t perform that action at this time.
0 commit comments