Esempio n. 1
0
        public BatchDescriptor next(BatchDescriptor batchDescriptor)
        {
            if (null == gatingSequences)
            {
            throw new NullReferenceException("gatingSequences must be set before claiming sequences");
            }

            long sequence = claimStrategy.incrementAndGet(batchDescriptor.getSize(), gatingSequences);
            batchDescriptor.setEnd(sequence);
            return batchDescriptor;
        }
Esempio n. 2
0
 public void publish(BatchDescriptor batchDescriptor)
 {
     publish(batchDescriptor.getEnd(), batchDescriptor.getSize());
 }