Class: Spymemcached::RubyTranscoder
- Inherits:
-
Object
- Object
- Spymemcached::RubyTranscoder
- Includes:
- Transcoder
- Defined in:
- lib/spymemcached.rb
Instance Method Summary collapse
Instance Method Details
#asyncDecode(data) ⇒ Object
14 15 16 |
# File 'lib/spymemcached.rb', line 14 def asyncDecode(data) false end |
#decode(data) ⇒ Object
18 19 20 |
# File 'lib/spymemcached.rb', line 18 def decode(data) Marshal.load(String.from_java_bytes(data.getData)) end |
#encode(obj) ⇒ Object
22 23 24 |
# File 'lib/spymemcached.rb', line 22 def encode(obj) CachedData.new(0, Marshal.dump(obj).to_java_bytes, getMaxSize) end |
#getMaxSize ⇒ Object
26 27 28 |
# File 'lib/spymemcached.rb', line 26 def getMaxSize CachedData::MAX_SIZE end |