/**
  * {@inheritdoc}
  */
 public function createAndPersist(ActionInterface $action, ComponentInterface $subject, $context = 'GLOBAL', $type = TimelineInterface::TYPE_TIMELINE)
 {
     $redisKey = $this->getRedisKey($subject, $context, $type);
     $this->persistedDatas[] = array('zAdd', $redisKey, $action->getSpreadTime(), $action->getId());
     // we want to deploy on a subject action list to enable ->getSubjectActions feature..
     if ('timeline' === $type) {
         $redisKey = $this->getSubjectRedisKey($action->getSubject());
         $this->persistedDatas[] = array('zAdd', $redisKey, $action->getSpreadTime(), $action->getId());
     }
 }
 /**
  * @param ActionInterface $action action
  *
  * @return EntryCollection
  */
 public function processSpreads(ActionInterface $action)
 {
     if ($this->onSubject) {
         $this->entryCollection->add(new Entry($action->getSubject()), 'GLOBAL');
     }
     foreach ($this->spreads as $spread) {
         if ($spread->supports($action)) {
             $spread->process($action, $this->entryCollection);
         }
     }
     return $this->getEntryCollection();
 }