@Test public void testGetBucket() throws Exception { Buckets<IHasShortcut> testSubject = makeTestBuckets(); MetricKey key = MetricKey.fromValue("My.Metric.Formal.Name", "MyMetric", "Foo=Bar"); testSubject.add(key, 123, 4.567); Buckets<IHasShortcut>.Bucket bucket = testSubject.getBucket(123); assertEquals("getValue should return the value put in with that key", bucket.getValue(key).getValue(), 4.567, EPSILON); assertEquals("getValueByShortcut should return the value put in with that shortcut", bucket.getValueByShortcut("My.Metric.Formal.Name").getValue(), 4.567, EPSILON); }
public final Buckets<P>.Bucket getBucket(long timestamp) { long bucketTimestamp = getBucketTimestamp(timestamp); return bucketList.get(bucketTimestamp); }
Buckets { public final Buckets<P>.Bucket getBucket(long timestamp) { long bucketTimestamp = getBucketTimestamp(timestamp); return bucketList.get(bucketTimestamp); } }
Buckets { public final Buckets<P>.Bucket getBucket(long timestamp) { long bucketTimestamp = getBucketTimestamp(timestamp); return bucketList.get(bucketTimestamp); } Buckets();  Buckets(final long secondsPerBucket); }
Buckets { public final Buckets<P>.Bucket getBucket(long timestamp) { long bucketTimestamp = getBucketTimestamp(timestamp); return bucketList.get(bucketTimestamp); } Buckets();  Buckets(final long secondsPerBucket); Map<Long, Bucket> getBucketList(); void addQueryStatus(P key, QueryStatus status); QueryStatus getQueryStatus(P key); final void add(final P primaryKey, final long timestamp, final double value); final void addInterpolated(final P primaryKey, final long timestamp, final double value); final Buckets<P>.Bucket getBucket(long timestamp); final SortedSet<Long> getTimestamps(); final long getSecondsPerBucket(); final void dump(PrintStream ps); }
Buckets { public final Buckets<P>.Bucket getBucket(long timestamp) { long bucketTimestamp = getBucketTimestamp(timestamp); return bucketList.get(bucketTimestamp); } Buckets();  Buckets(final long secondsPerBucket); Map<Long, Bucket> getBucketList(); void addQueryStatus(P key, QueryStatus status); QueryStatus getQueryStatus(P key); final void add(final P primaryKey, final long timestamp, final double value); final void addInterpolated(final P primaryKey, final long timestamp, final double value); final Buckets<P>.Bucket getBucket(long timestamp); final SortedSet<Long> getTimestamps(); final long getSecondsPerBucket(); final void dump(PrintStream ps); static final long DEFAULT_BUCKET_SIZE; }