NAME

BuildForge::Services::DBO::Semaphore


SYNOPSIS

        use BuildForge::Services;
        $conn = new BuildForge::Services::Connection($hostname);
        $token = $conn->authUser($user, $pass);
        
        # Getting existing semaphores
        $allSemaphores = BuildForge::Services::DBO::Semaphore->findAll($conn);
        $semaphore = BuildForge::Services::DBO::Semaphore->findById($conn, 'SEM1');
        # Getter / setter functions
        $id = $semaphore->getName();
        $isActive = $semaphore->getActive();
        $buildId = $semaphore->getBuildId();
        $requestor = $semaphore->getRequestor();
        $timestamp = $semaphore->getTimestamp();
        
        # Semaphore releasing / deletion
        $newsemaphore->release();
        $newsemaphore->delete();
                
        $conn->logout;
        $conn->close;


DESCRIPTION

Semaphore allows you to view, release, and delete BuildForge semaphores.


METHODS

BuildForge::Services::DBO::Semaphore->findAll(connection)

Returns a reference to an array of BuildForge::Services::DBO::Semaphore objects corresponding to all semaphores in the database.

connection

A connected BuildForge::Services::Connection object.

BuildForge::Services::DBO::Semaphore->findById(connection, semaphoreId)

Returns the BuildForge::Services::DBO::Semaphore object corresponding to the given semaphore ID, or undef if no such object exists.

connection

A connected BuildForge::Services::Connection object.

semaphoreId

The name / ID of the desired semaphore (from $semaphore->getName()).

$semaphore->release()

Releases the semaphore while leaving it in the database.

$semaphore->delete()

Releases the semaphore and deletes it from the database.

$semaphore->getName()

Returns the ID / name of the semaphore.

$semaphore->getActive()

Returns 1 if the semaphore is currently active or 0 otherwise.

$semaphore->getBuildId()

Returns the build ID of the build that currently holds the semaphore.

$semaphore->getRequestor()

Returns a string describing who last requested the semaphore.

$semaphore->getTimestamp()

Returns the timestamp for the time the semaphore was last acquired or released.


COPYRIGHT

Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.