Class: LS4::MemcacheMDS::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/ls4/service/mds_memcache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attrsObject

Returns the value of attribute attrs.



137
138
139
# File 'lib/ls4/service/mds_memcache.rb', line 137

def attrs
  @attrs
end

#rsidObject

Returns the value of attribute rsid.



135
136
137
# File 'lib/ls4/service/mds_memcache.rb', line 135

def rsid
  @rsid
end

#vtimeObject

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

#to_okey(key) ⇒ Object



139
140
141
# File 'lib/ls4/service/mds_memcache.rb', line 139

def to_okey(key)
	ObjectKey.new(key, @vtime, @rsid)
end