예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function set(Counter $counter)
 {
     apc_store($this->prefix . '/' . $counter->getName(), $counter->getValue());
     return $counter;
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function set(Counter $counter)
 {
     $this->getCollection()->add($this->prefix . '.' . $counter->getName(), $counter->getValue());
     return $counter;
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function set(Counter $counter)
 {
     $this->getClient()->set($counter->getName(), $counter->getValue());
     return $counter;
 }
예제 #4
0
 /**
  * {@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']);
 }