Sets the lock instance on caller that implements the LockAware trait

@param \BeatSwitch\Lock\Callers\Caller $caller
@return \BeatSwitch\Lock\Callers\Caller
357221
public function makeCallerLockAware(Caller $caller)
    {
        $lock = $this->caller($caller);

        $caller->setLock($lock);

        return $caller;
    }
238337
public function set($id, callable $resolver)
    {
        $this->innerSet($id, $resolver);
        unset($this->resolved[$id]);
        unset($this->singletons[$id]);
        return $this;
    }
1210609
static public function init(LockHandlerInterface $lockHandler)
    {
        if (is_null(self::$singletonObject)) {
            self::$singletonObject = new self($lockHandler);
        }
        return self::$singletonObject;
    }
954876
protected function createLock($value) {
        $lockFile = $this->getLockName($value);
        file_create($lockFile);
        $this->locks[$value] = $lockFile;

        return $lockFile;
    }
231354
public function setCoreLockTtl($value)
    {
        $this->setFieldName('lock_ttl');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
1072421
public function setPhone($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->phone !== $v) {
            $this->phone = $v;
            $this->modifiedColumns[] = UserPeer::PHONE;
        }


        return $this;
    }
1274060
public function runner($runner)
    {
        if ($runner instanceof Runner) {
            $this->runner = $runner;
        } else {
            $this->runner = $this->getRunner($runner);
        }

        return $this;
    }
905075
public function set($name, $value)
    {
        $this->instance->unlock();
        $result = $this->instance->set($name, $value);
        $this->instance->lock();

        return $result;
    }
1238196
public function setContact($contact)
    {
        if ($contact instanceof Contact) {
            $contact = $contact->getId();
        }

        $this->contact = $contact;

        return $this;
    }
775620
public function benchmark($caller, $record, string $context = '')
    {
        $benchmarkID = count($this->benchmarks);
        if (is_array($record)) {
            $benchmarkID = $record[0];
        } elseif (!isset($this->benchmarks[$benchmarkID])) {
            $this->benchmarks[$benchmarkID] = [$caller, $record, $context, microtime(true)];

            //Payload
            return [$benchmarkID];
        }

        if (!isset($this->benchmarks[$benchmarkID])) {
            throw new BenchmarkException("Unpaired benchmark record '{$benchmarkID}'");
        }

        $this->benchmarks[$benchmarkID][4] = microtime(true);

        return $this->benchmarks[$benchmarkID][4] - $this->benchmarks[$benchmarkID][3];
    }
1046522
public function setSender(ContactInterface $sender = null)
    {
        if ($sender !== null && !($sender instanceof Contact)) {
            throw new InvalidArgumentException(
                sprintf(
                    '%s expects an instance of %s.',
                    __FUNCTION__, Contact::class
                )
            );
        }
        $this->sender = $sender;

        return $this;
    }
178561
public function setPhone($phone)
    {
        if (!empty($phone) && is_string($phone) && ctype_print($phone)) {
            $this->phone = trim($phone);
        }

        return $this;
    }
593556
private function executeInLock($lockName, callable $callback)
    {
        $this->res->getManagementLock()->lock($lockName);

        try {
            return call_user_func($callback);
        } finally {
            $this->res->getManagementLock()->unlock($lockName);
        }
    }
152725
public static function GetAndStoreUsersInSession($caller) {
        $users = array();
        if (!$caller->app()->user()->getAttribute(\Puzzlout\Framework\Enums\SessionKeys::AllUsers)) {
            $manager = $caller->managers()->getDalInstance($caller->module());
            $users = $manager->selectAllUsers();

            $caller->app()->user->setAttribute(
                    \Puzzlout\Framework\Enums\SessionKeys::AllUsers, $users
            );
        } else {
            $users = $caller->app()->user->getAttribute(\Puzzlout\Framework\Enums\SessionKeys::AllUsers);
        }
        return $users;
    }
342962
public function actionDelete($caller, $id)
    {
        $this->findModel($id)->delete();
        return $this->redirect(['index', 'caller' => $caller]);
    }
877764
public function lock($lock = false)
    {
        $this->options['lock']   = $lock;
        $this->options['master'] = true;

        return $this;
    }
426564
public function setScheduler(\CampaignChain\CoreBundle\Entity\Scheduler $scheduler = null)
    {
        $this->scheduler = $scheduler;

        return $this;
    }