@Test public void testWithBucketIdProvider() throws Exception { BucketedDistribution distribution = new BucketedDistribution(); distribution.setBucketIdProvider(bucketIdProvider); distribution.add(1); assertPreviousDistributionEmpty(distribution); ++bucketIdProvider.id; distribution.add(2); distribution.add(3); assertPreviousDistribution(distribution, 1, 1, 1, 1); ++bucketIdProvider.id; assertPreviousDistribution(distribution, 2, 2, 3, 5); }
public void add(final long value) { applyToCurrentBucket((Function<Distribution, Void>) input -> { synchronized (input) { input.digest.add(value); input.total += value; } return null; }); }
BucketedDistribution extends Bucketed<BucketedDistribution.Distribution> { public void add(final long value) { applyToCurrentBucket((Function<Distribution, Void>) input -> { synchronized (input) { input.digest.add(value); input.total += value; } return null; }); } }
BucketedDistribution extends Bucketed<BucketedDistribution.Distribution> { public void add(final long value) { applyToCurrentBucket((Function<Distribution, Void>) input -> { synchronized (input) { input.digest.add(value); input.total += value; } return null; }); }  }
BucketedDistribution extends Bucketed<BucketedDistribution.Distribution> { public void add(final long value) { applyToCurrentBucket((Function<Distribution, Void>) input -> { synchronized (input) { input.digest.add(value); input.total += value; } return null; }); }  void add(final long value); }
BucketedDistribution extends Bucketed<BucketedDistribution.Distribution> { public void add(final long value) { applyToCurrentBucket((Function<Distribution, Void>) input -> { synchronized (input) { input.digest.add(value); input.total += value; } return null; }); }  void add(final long value);  }