00001 <?php
00002 /***************************************************************************00003 * Copyright (C) 2005-2006 by Konstantin V. Arkhipov *00004 * *00005 * This program is free software; you can redistribute it and/or modify *00006 * it under the terms of the GNU General Public License as published by *00007 * the Free Software Foundation; either version 2 of the License, or *00008 * (at your option) any later version. *00009 * *00010 ***************************************************************************/00011 /* $Id: SemaphorePool.class.php 3202 2007-04-30 19:01:43Z voxus $ */00012
00023finalclass SemaphorePoolextendsBaseLocker implements Instantiatable00024 {
00025privatestatic$lockerName = 'SystemFiveLocker';
00026privatestatic$locker = null;
00027
00028protected function __construct()
00029 {
00030 self::$locker = Singleton::getInstance(self::$lockerName);
00031 }
00032
00033publicstatic function setDefaultLocker($name)
00034 {
00035 self::$lockerName = $name;
00036 self::$locker = Singleton::getInstance($name);
00037 }
00038
00042publicstatic function me()
00043 {
00044 returnSingleton::getInstance(__CLASS__);
00045 }
00046
00047public function get($key)
00048 {
00049 return self::$locker->get($key);
00050 }
00051
00052public function free($key)
00053 {
00054 return self::$locker->free($key);
00055 }
00056
00057public function drop($key)
00058 {
00059 return self::$locker->drop($key);
00060 }
00061
00062public function clean()
00063 {
00064 return self::$locker->clean();
00065 }
00066
00067public function __destruct()
00068 {
00069 self::$locker->clean();
00070 }
00071 }
00072 ?>
generated by doxygen-1.5.1
for onPHP at Mon Apr 30 23:10:09 2007