Class: Euston::EventStore::Persistence::StreamHead
- Inherits:
-
Object
- Object
- Euston::EventStore::Persistence::StreamHead
- Includes:
- Mongodb::MongoStreamHead
- Defined in:
- lib/euston-eventstore/persistence/stream_head.rb,
lib/euston-eventstore/persistence/mongodb/mongo_stream_head.rb
Overview
Indicates the most recent information representing the head of a given stream.
Instance Attribute Summary collapse
-
#head_revision ⇒ Object
readonly
Gets the value which indicates the revision, length, or number of events committed to the stream.
-
#snapshot_revision ⇒ Object
readonly
Gets the value which indicates the revision at which the last snapshot was taken.
-
#stream_id ⇒ Object
readonly
Gets the value which uniquely identifies the stream where the last snapshot exceeds the allowed threshold.
Instance Method Summary collapse
-
#initialize(stream_id, head_revision, snapshot_revision) ⇒ StreamHead
constructor
A new instance of StreamHead.
Methods included from Mongodb::MongoStreamHead
Constructor Details
#initialize(stream_id, head_revision, snapshot_revision) ⇒ StreamHead
Returns a new instance of StreamHead.
6 7 8 9 10 |
# File 'lib/euston-eventstore/persistence/stream_head.rb', line 6 def initialize stream_id, head_revision, snapshot_revision @stream_id = stream_id @head_revision = head_revision @snapshot_revision = snapshot_revision end |
Instance Attribute Details
#head_revision ⇒ Object (readonly)
Gets the value which indicates the revision, length, or number of events committed to the stream.
16 17 18 |
# File 'lib/euston-eventstore/persistence/stream_head.rb', line 16 def head_revision @head_revision end |
#snapshot_revision ⇒ Object (readonly)
Gets the value which indicates the revision at which the last snapshot was taken.
19 20 21 |
# File 'lib/euston-eventstore/persistence/stream_head.rb', line 19 def snapshot_revision @snapshot_revision end |
#stream_id ⇒ Object (readonly)
Gets the value which uniquely identifies the stream where the last snapshot exceeds the allowed threshold.
13 14 15 |
# File 'lib/euston-eventstore/persistence/stream_head.rb', line 13 def stream_id @stream_id end |