Class: Amalgalite::BusyHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/amalgalite/busy_timeout.rb

Overview

A base class for use in creating your own busy handler classes

Direct Known Subclasses

BusyTimeout

Instance Method Summary collapse

Instance Method Details

#arityObject

the arity of the call method



11
# File 'lib/amalgalite/busy_timeout.rb', line 11

def arity() 1 ; end

#call(count) ⇒ Object

Override this method, returning false if the SQLite should return SQLITE_BUSY for all parties involved in the lock, and anything else if the lock attempt should be tried again.

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/amalgalite/busy_timeout.rb', line 17

def call( count )
  raise NotImplementedError, "The busy handler call(N) method must be implemented"
end

#to_procObject



6
7
8
# File 'lib/amalgalite/busy_timeout.rb', line 6

def to_proc
  self
end