findAll(connection)
release()
delete()
getName()
getActive()
getBuildId()
getRequestor()
getTimestamp()
BuildForge::Services::DBO::Semaphore
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;
Semaphore allows you to view, release, and delete BuildForge semaphores.
findAll(connection)
Returns a reference to an array of BuildForge::Services::DBO::Semaphore objects corresponding to all semaphores in the database.
A connected BuildForge::Services::Connection object.
Returns the BuildForge::Services::DBO::Semaphore object corresponding to the given semaphore ID, or undef if no such object exists.
A connected BuildForge::Services::Connection object.
The name / ID of the desired semaphore (from $semaphore->getName()).
release()
Releases the semaphore while leaving it in the database.
delete()
Releases the semaphore and deletes it from the database.
getName()
Returns the ID / name of the semaphore.
getActive()
Returns 1 if the semaphore is currently active or 0 otherwise.
getBuildId()
Returns the build ID of the build that currently holds the semaphore.
getRequestor()
Returns a string describing who last requested the semaphore.
getTimestamp()
Returns the timestamp for the time the semaphore was last acquired or released.
Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.