Class: Moneta::Adapters::LRUHash::Entry
- Inherits:
-
Object
- Object
- Moneta::Adapters::LRUHash::Entry
- Defined in:
- lib/moneta/adapters/lruhash.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#key ⇒ Object
109 110 111 |
# File 'lib/moneta/adapters/lruhash.rb', line 109 def key @key end |
#next ⇒ Object
109 110 111 |
# File 'lib/moneta/adapters/lruhash.rb', line 109 def next @next end |
#prev ⇒ Object
109 110 111 |
# File 'lib/moneta/adapters/lruhash.rb', line 109 def prev @prev end |
#value ⇒ Object
109 110 111 |
# File 'lib/moneta/adapters/lruhash.rb', line 109 def value @value end |
Instance Method Details
#insert_after(entry) ⇒ Object
117 118 119 120 121 122 123 124 125 |
# File 'lib/moneta/adapters/lruhash.rb', line 117 def insert_after(entry) if entry.next != self unlink @next = entry.next @prev = entry entry.next.prev = self entry.next = self end end |
#unlink ⇒ Object
111 112 113 114 115 |
# File 'lib/moneta/adapters/lruhash.rb', line 111 def unlink @prev.next = @next if @prev @next.prev = @prev if @next @prev = @next = nil end |