All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.proofpoint.reporting.testing.TestingBucketIdProvider Maven / Gradle / Ivy

There is a newer version: 3.23
Show newest version
package com.proofpoint.reporting.testing;

import com.proofpoint.reporting.BucketIdProvider;

import java.util.concurrent.atomic.AtomicInteger;

import static com.proofpoint.reporting.BucketIdProvider.BucketId.bucketId;

class TestingBucketIdProvider
    implements BucketIdProvider
{
    private AtomicInteger bucket = new AtomicInteger();

    @Override
    public BucketId get()
    {
        int id = bucket.get();
        return bucketId(id, id * 10);
    }

    void incrementBucket()
    {
        bucket.incrementAndGet();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy