class BDB::Lockid - RDoc Documentation

# class BDB::Lockid

a BDB::Lockid object is created by the method lock, lock_id

### Public Instance Methods

get(string, mode , flags = 0) click to toggle source

The #lock_get function acquires a lock from the lock table, it return an object BDB::Lock

string specifies the object to be locked or released.

mode is an index into the environment's lock conflict array

flags value must be set to 0 or the value BDBD::LOCK_NOWAIT in this case if a lock cannot be granted because the requested lock conflicts with an existing lock, raise an error BDB::LockGranted

    # File lock.rb, line 15
    def  get(string, mode , flags = 0)
    end

lock_get(string, mode [, flags]) click to toggle source

same than get

    # File lock.rb, line 18
    def  lock_get(string, mode [, flags])
    end

lock_vec(array [, flags]) click to toggle source

same than vec

    # File lock.rb, line 53
    def  lock_vec(array [, flags])
    end

vec(array , flags = 0) click to toggle source

The lock_vec function atomically obtains and releases one or more locks from the lock table. The lock_vec function is intended to support acquisition or trading of multiple locks under one lock table semaphore, as is needed for lock coupling or in multigranularity locking for lock escalation.

- array ARRAY of HASH with the following keys

  - “op”

    the operation to be performed, which must be set to one of the following values BDB::LOCK_GET, BDB::LOCK_PUT, BDB::LOCK_PUT_ALL or BDB::LOCK_PUT_OBJ

  - “obj” the object (String) to be locked or released

  - “mode” is an index into the environment's lock conflict array

  - “lock” an object BDB::Lock

- flags value must be set to 0 or the value BDBD::LOCK_NOWAIT in this case if a lock cannot be granted because the requested lock conflicts with an existing lock, raise an error BDB::LockGrantedreturn immediately

    # File lock.rb, line 50
    def  vec(array , flags = 0)
    end