Class: LS4::MemcacheMDS::Entry
- Inherits:
-
Object
- Object
- LS4::MemcacheMDS::Entry
- Defined in:
- lib/ls4/service/mds_memcache.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
Returns the value of attribute attrs.
-
#rsid ⇒ Object
Returns the value of attribute rsid.
-
#vtime ⇒ Object
Returns the value of attribute vtime.
Instance Method Summary collapse
- #from_msgpack(obj) ⇒ Object
-
#initialize(rsid = nil, vtime = nil, attrs = nil) ⇒ Entry
constructor
A new instance of Entry.
- #to_msgpack(out = '') ⇒ Object
- #to_okey(key) ⇒ Object
Constructor Details
#initialize(rsid = nil, vtime = nil, attrs = nil) ⇒ Entry
Returns a new instance of Entry.
129 130 131 132 133 |
# File 'lib/ls4/service/mds_memcache.rb', line 129 def initialize(rsid=nil, vtime=nil, attrs=nil) @rsid = rsid @vtime = vtime @attrs = attrs end |
Instance Attribute Details
#attrs ⇒ Object
Returns the value of attribute attrs.
137 138 139 |
# File 'lib/ls4/service/mds_memcache.rb', line 137 def attrs @attrs end |
#rsid ⇒ Object
Returns the value of attribute rsid.
135 136 137 |
# File 'lib/ls4/service/mds_memcache.rb', line 135 def rsid @rsid end |
#vtime ⇒ Object
Returns the value of attribute vtime.
136 137 138 |
# File 'lib/ls4/service/mds_memcache.rb', line 136 def vtime @vtime end |
Instance Method Details
#from_msgpack(obj) ⇒ Object
147 148 149 150 151 152 |
# File 'lib/ls4/service/mds_memcache.rb', line 147 def from_msgpack(obj) @rsid = obj[0] @vtime = obj[1] @attrs = obj[2] self end |
#to_msgpack(out = '') ⇒ Object
143 144 145 |
# File 'lib/ls4/service/mds_memcache.rb', line 143 def to_msgpack(out = '') [@rsid, @vtime, @attrs].to_msgpack(out) end |