Skip to content

Commit

Permalink
make inner classes static where possible, and remove outer class refe…
Browse files Browse the repository at this point in the history
…rence
  • Loading branch information
mebigfatguy committed Jun 3, 2016
1 parent 278d7bb commit 715e3a2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ public Long call() {
}
}

private class MetricsPollerThreadFactory implements ThreadFactory {
private static class MetricsPollerThreadFactory implements ThreadFactory {
private static final String MetricsThreadName = "HystrixMetricPoller";

private final ThreadFactory defaultFactory = Executors.defaultThreadFactory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ LongMaxUpdater getMaxUpdater(HystrixRollingNumberEvent type) {
* <p>
* benjchristensen => This implementation was chosen based on performance testing I did and documented at: http://benjchristensen.com/2011/10/08/atomiccirculararray/
*/
/* package */class BucketCircularArray implements Iterable<Bucket> {
/* package */static class BucketCircularArray implements Iterable<Bucket> {
private final AtomicReference<ListState> state;
private final int dataLength; // we don't resize, we always stay the same, so remember this
private final int numBuckets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ private int computePercentile(double percent) {
* <p>
* benjchristensen => This implementation was chosen based on performance testing I did and documented at: http://benjchristensen.com/2011/10/08/atomiccirculararray/
*/
/* package for testing */ class BucketCircularArray implements Iterable<Bucket> {
/* package for testing */ static class BucketCircularArray implements Iterable<Bucket> {
private final AtomicReference<ListState> state;
private final int dataLength; // we don't resize, we always stay the same, so remember this
private final int numBuckets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void run() {
return new TimerReference(listener, f);
}

private class TimerReference extends SoftReference<TimerListener> {
private static class TimerReference extends SoftReference<TimerListener> {

private final ScheduledFuture<?> f;

Expand Down

0 comments on commit 715e3a2

Please sign in to comment.