class RenewableBatchIdSequence implements IdSequence, Resource {

    @Override
    public long nextId()
    {
        assert !closed;

        long id;
        while ( currentBatch == null || (id = currentBatch.nextId()) == VALUE_REPRESENTING_NULL )
        {
            currentBatch = source.nextIdBatch( batchSize ).iterator();
        }
        return id;
    }

      RenewableBatchIdSequence( IdSequence source, int batchSize, LongConsumer excessIdConsumer );

}