Class: Arrow::Session::NullLock

Inherits:
Lock show all
Defined in:
lib/arrow/session/nulllock.rb

Overview

The Arrow::Session::NullLock class, a derivative of Arrow::Session::Lock. This is a null lock, in that it does not lock. This is to be used with an ActiveRecord session store that uses Optomistic Concurrency Control.

VCS Id

$Id$

Authors

Please see the file LICENSE in the top-level directory for licensing details.

Constant Summary

Constants inherited from Lock

Lock::READ, Lock::UNLOCKED, Lock::WRITE

Instance Method Summary collapse

Methods inherited from Lock

create, derivativeDirs, #finish, #locked?, #read_lock, #read_locked?, #read_unlock, #release_all_locks, #with_read_lock, #with_write_lock, #write_lock, #write_locked?, #write_unlock

Methods inherited from Object

deprecate_class_method, deprecate_method, inherited

Constructor Details

#initialize(uri, id) ⇒ NullLock

Returns a new instance of NullLock.



22
23
24
# File 'lib/arrow/session/nulllock.rb', line 22

def initialize( uri, id )
	super
end

Instance Method Details

#acquire_read_lock(blocking) ⇒ Object



26
27
28
# File 'lib/arrow/session/nulllock.rb', line 26

def acquire_read_lock(blocking)
	true
end

#acquire_write_lock(blocking) ⇒ Object



30
31
32
# File 'lib/arrow/session/nulllock.rb', line 30

def acquire_write_lock(blocking)
	true
end

#release_read_lockObject



34
35
36
# File 'lib/arrow/session/nulllock.rb', line 34

def release_read_lock
	true
end

#release_write_lockObject



38
39
40
# File 'lib/arrow/session/nulllock.rb', line 38

def release_write_lock
	true
end