Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated documentation in batch_descriptor.h

  • Loading branch information...
commit 333c402e8082770fb0b639fcf3aec8cc1f1b899b 1 parent 9f113e7
@fsaintjacques authored
Showing with 17 additions and 1 deletion.
  1. +17 −1 disruptor/batch_descriptor.h
View
18 disruptor/batch_descriptor.h
@@ -5,18 +5,34 @@
namespace disruptor {
+// Used to record the batch of sequences claimed via {@link Sequencer}.
class BatchDescriptor {
public:
+ // Create a holder for tracking a batch of claimed sequences in a
+ // {@link Sequencer}
+ //
+ // @param size of the batch to claim.
BatchDescriptor(int size) :
size_(size),
end_(kInitialCursorValue) {}
+ // Get the size of the batch
int size() const { return size_; }
+ // Get the end sequence of a batch.
+ //
+ // @return the end sequence in the batch.
+ int64_t end() const { return end_; }
+
+ // Set the end sequence of a batch.
+ //
+ // @param end sequence in the batch.
void set_end(int64_t end) { end_ = end; }
- int64_t end() const { return end_; }
+ // Get the starting sequence of the batch.
+ //
+ // @return starting sequence in the batch.
int64_t Start() const { return end_ - size_ + 1L; }
private:

0 comments on commit 333c402

Please sign in to comment.
Something went wrong with that request. Please try again.