Ricardo Signes > DBIx-Locker-0.091350 > DBIx::Locker::Lock

Download:
DBIx-Locker-0.091350.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.091350   Source   Latest Release: DBIx-Locker-0.092650

NAME ^

DBIx::Locker::Lock - a live resource lock

VERSION ^

version 0.091350

METHODS ^

new

Calling this method is a very, very stupid idea. This method is called by DBIx::Locker to create locks. Since you are not a locker, you should not call this method. Seriously.

    my $locker = DBIx::Locker::Lock->new(\%arg);

This returns a new lock.

    locker    - the locker creating the lock
    lock_id   - the id of the lock in the lock table
    expires   - the time (in epoch seconds) at which the lock will expire
    locked_by - a hashref of identifying information

locker

lock_id

expires

locked_by

These are accessors for data supplied to "new".

guid

This method returns the lock's globally unique id.

unlock

This method unlocks the lock, deleting the semaphor record. This method is automatically called when locks are garbage collected.

AUTHOR ^

  Ricardo SIGNES <rjbs@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2009 by Ricardo SIGNES.

This is free software; you can redistribute it and/or modify it under the same terms as perl itself.