protected function processSyncOperations(Array $subjectsAndPredicatesOfChange, $contextAlias)
    {
        foreach($this->getSyncOperations() as $op)
        {
            /** @var \Tripod\Mongo\Composites\IComposite $composite */
            $composite = $this->tripod->getComposite($op);
            $opSubjects = $composite->getImpactedSubjects($subjectsAndPredicatesOfChange,$contextAlias);
            if (!empty($opSubjects)) {
                foreach($opSubjects as $subject)
                {
                    /* @var $subject ImpactedSubject */
                    $t = new \Tripod\Timer();
                    $t->start();

                    // Call update on the subject, rather than the composite directly, in case the change was to
                    // another pod
                    $subject->update($subject);

                    $t->stop();

                    $this->timingLog(MONGO_ON_THE_FLY_MR,array(
                        "duration"=>$t->result(),
                        "storeName"=>$subject->getStoreName(),
                        "podName"=>$subject->getPodName(),
                        "resourceId"=>$subject->getResourceId()
                    ));
                    $this->getStat()->timer(MONGO_ON_THE_FLY_MR,$t->result());
                }
            }
        }

    }
protected function processSyncOperations(Array $subjectsAndPredicatesOfChange, $contextAlias)
    {
        foreach($this->getSyncOperations() as $op)
        {
            /** @var \Tripod\Mongo\Composites\IComposite $composite */
            $composite = $this->tripod->getComposite($op);
            $opSubjects = $composite->getImpactedSubjects($subjectsAndPredicatesOfChange,$contextAlias);
            if (!empty($opSubjects)) {
                foreach($opSubjects as $subject)
                {
                    /* @var $subject ImpactedSubject */
                    $t = new \Tripod\Timer();
                    $t->start();

                    // Call update on the subject, rather than the composite directly, in case the change was to
                    // another pod
                    $subject->update($subject);

                    $t->stop();

                    $this->timingLog(MONGO_ON_THE_FLY_MR,array(
                        "duration"=>$t->result(),
                        "storeName"=>$subject->getStoreName(),
                        "podName"=>$subject->getPodName(),
                        "resourceId"=>$subject->getResourceId()
                    ));
                    $this->getStat()->timer(MONGO_ON_THE_FLY_MR,$t->result());
                }
            }
        }

    }
protected function processSyncOperations ( Array $ subjectsAndPredicatesOfChange , $ contextAlias ) { foreach ( $ this -> getSyncOperations ( ) as $ op ) { /** @var \Tripod\Mongo\Composites\IComposite $composite */ $ composite = $ this -> tripod -> getComposite ( $ op ) ; $ opSubjects = $ composite -> getImpactedSubjects ( $ subjectsAndPredicatesOfChange , $ contextAlias ) ; if ( ! empty ( $ opSubjects ) ) { foreach ( $ opSubjects as $ subject ) { /* @var $subject ImpactedSubject */ $ t = new \ Tripod \ Timer ( ) ; $ t -> start ( ) ; // Call update on the subject, rather than the composite directly, in case the change was to // another pod $ subject -> update ( $ subject ) ; $ t -> stop ( ) ; $ this -> timingLog ( MONGO_ON_THE_FLY_MR , array ( "duration" => $ t -> result ( ) , "storeName" => $ subject -> getStoreName ( ) , "podName" => $ subject -> getPodName ( ) , "resourceId" => $ subject -> getResourceId ( ) ) ) ; $ this -> getStat ( ) -> timer ( MONGO_ON_THE_FLY_MR , $ t -> result ( ) ) ; } } } }
Processes each subject synchronously
@param array $subjectsAndPredicatesOfChange
@param string $contextAlias
Processes each subject synchronously