예제 #1
0
 /**
  * @param string $subject
  * @param boolean $exclusiveLock TRUE to, acquire an exclusive (write) lock, FALSE for a shared (read) lock. An exclusive lock ist the default.
  */
 public function __construct($subject, $exclusiveLock = true)
 {
     if (self::$lockManager === null) {
         return;
     }
     $this->lockStrategy = self::$lockManager->getLockStrategyInstance();
     $this->lockStrategy->acquire($subject, $exclusiveLock);
 }