/**
  * Save entity from main storage to secondary storage.
  *
  * @param IPersistableDeferred $slave
  * @param mixed                $id
  * @param object               $masterResult
  *
  * @return mixed
  */
 protected function slaveAction($slave, $id, $masterResult)
 {
     if (is_null($masterResult)) {
         return null;
     }
     return $slave->saveDeferred($masterResult);
 }
Beispiel #2
0
 /**
  * Deferred save to secondary storage.
  *
  * Could contain the request to message queue.
  *
  * @param IPersistableDeferred $slave
  * @param object               $entity
  * @param object               $masterResult
  *
  * @return mixed
  */
 protected function slaveAction($slave, $entity, $masterResult)
 {
     return $slave->saveDeferred($masterResult);
 }