Class: LRUHash::NoopMutex

Inherits:
Object
  • Object
show all
Defined in:
lib/semian/lru_hash.rb

Overview

This LRU (Least Recently Used) hash will allow the cleaning of resources as time goes on. The goal is to remove the least recently used resources everytime we set a new resource. A default window of 5 minutes will allow empty item to stay in the hash for a maximum of 5 minutes

Instance Method Summary collapse

Instance Method Details

#locked?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/semian/lru_hash.rb', line 21

def locked?
  true
end

#owned?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/semian/lru_hash.rb', line 25

def owned?
  true
end

#synchronizeObject



9
10
11
# File 'lib/semian/lru_hash.rb', line 9

def synchronize(*)
  yield
end

#try_lockObject



13
14
15
# File 'lib/semian/lru_hash.rb', line 13

def try_lock
  true
end

#unlockObject



17
18
19
# File 'lib/semian/lru_hash.rb', line 17

def unlock
  true
end