code: void onSealExclusive(Batch batch)
    {
      buffersToEmit.add(batch);
      wakeUpEmittingThread();
      if (!isTerminated()) {
        int nextBatchNumber = EmittedBatchCounter.nextBatchNumber(batch.batchNumber);
        if (!concurrentBatch.compareAndSet(batch, new Batch(this, acquireBuffer(), nextBatchNumber))) {
          // If compareAndSet failed, the service is closed concurrently.
          Preconditions.checkState(isTerminated());
        }
      }
    }
docs: Called from {@link Batch} only once for each Batch in existence.