public function acquireLock($name, $timeout = null) { if (!$this->available) { return false; } $this->counter++; return true; }