/** * {@inheritdoc} */ public function set(Counter $counter) { apc_store($this->prefix . '/' . $counter->getName(), $counter->getValue()); return $counter; }
/** * {@inheritdoc} */ public function set(Counter $counter) { $this->getCollection()->add($this->prefix . '.' . $counter->getName(), $counter->getValue()); return $counter; }
/** * {@inheritdoc} */ public function set(Counter $counter) { $this->getClient()->set($counter->getName(), $counter->getValue()); return $counter; }
/** * {@inheritdoc} */ public function set(Counter $counter) { $result = $this->getCollection()->findAndModify(array('counter' => $counter->getName()), array('$setOnInsert' => array('value' => $counter->getValue())), array(), array('upsert' => true, 'new' => true)); return Counter::create($counter->getName(), $result['value']); }