@@ -33,15 +33,15 @@ class BucketDiagnostics {
3333 private long latestFlushedBucketStartMs = -1 ;
3434 private final BucketFlushListener bucketFlushListener ;
3535
36- public BucketDiagnostics (Job job , BucketFlushListener bucketFlushListener ) {
36+ BucketDiagnostics (Job job , BucketFlushListener bucketFlushListener ) {
3737 bucketSpanMs = job .getAnalysisConfig ().getBucketSpan ().millis ();
3838 latencyMs = job .getAnalysisConfig ().getLatency () == null ? 0 : job .getAnalysisConfig ().getLatency ().millis ();
3939 maxSize = Math .max ((int ) (Intervals .alignToCeil (latencyMs , bucketSpanMs ) / bucketSpanMs ), MIN_BUCKETS );
4040 buckets = new long [maxSize ];
4141 this .bucketFlushListener = bucketFlushListener ;
4242 }
4343
44- public void addRecord (long recordTimestampMs ) {
44+ void addRecord (long recordTimestampMs ) {
4545 long bucketStartMs = Intervals .alignToFloor (recordTimestampMs , bucketSpanMs );
4646
4747 // Initialize earliest/latest times
@@ -103,7 +103,7 @@ private long getTimestampMs(int bucketIndex) {
103103 return latestBucketStartMs - offsetToLatest * bucketSpanMs ;
104104 }
105105
106- public void flush () {
106+ void flush () {
107107 if (latestBucketStartMs < 0 ) {
108108 return ;
109109 }
@@ -115,7 +115,7 @@ public void flush() {
115115 }
116116 }
117117
118- public double averageBucketCount () {
118+ double averageBucketCount () {
119119 return (double ) movingBucketCount / size ();
120120 }
121121
@@ -126,7 +126,7 @@ private int size() {
126126 return (int ) ((latestBucketStartMs - earliestBucketStartMs ) / bucketSpanMs ) + 1 ;
127127 }
128128
129- public interface BucketFlushListener {
129+ interface BucketFlushListener {
130130 void onBucketFlush (long bucketStartMs , long bucketCounts );
131131 }
132132}
0 commit comments