Class: Tupelo::Archiver::PersistentTuplespace::Rec
- Defined in:
- lib/tupelo/archiver/persistent-tuplespace.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#id ⇒ Object
Returns the value of attribute id.
-
#next_rec_to_save ⇒ Object
linked list of recs to update to db.
-
#packed ⇒ Object
Returns the value of attribute packed.
Instance Method Summary collapse
-
#initialize(ts, obj) ⇒ Rec
constructor
A new instance of Rec.
- #unmark_to_save ⇒ Object
Constructor Details
#initialize(ts, obj) ⇒ Rec
Returns a new instance of Rec.
15 16 17 18 19 20 |
# File 'lib/tupelo/archiver/persistent-tuplespace.rb', line 15 def initialize ts, obj @id = ts.next_id @count = 0 @packed = MessagePack.pack(obj) @next_rec_to_save = nil end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
9 10 11 |
# File 'lib/tupelo/archiver/persistent-tuplespace.rb', line 9 def count @count end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/tupelo/archiver/persistent-tuplespace.rb', line 8 def id @id end |
#next_rec_to_save ⇒ Object
linked list of recs to update to db
13 14 15 |
# File 'lib/tupelo/archiver/persistent-tuplespace.rb', line 13 def next_rec_to_save @next_rec_to_save end |
#packed ⇒ Object
Returns the value of attribute packed.
10 11 12 |
# File 'lib/tupelo/archiver/persistent-tuplespace.rb', line 10 def packed @packed end |
Instance Method Details
#unmark_to_save ⇒ Object
22 23 24 |
# File 'lib/tupelo/archiver/persistent-tuplespace.rb', line 22 def unmark_to_save @next_rec_to_save = nil end |