public function __construct($synchronizationObject, $synchronizationRSMObject)
 {
     $this->_logger = LoggerFactory::getFileLogger('SynchronizationSwitcher');
     $this->_synchronization = $synchronizationObject;
     $this->_synchronizationRSM = $synchronizationRSMObject;
     if ($this->_synchronizationRSM->hasServerAnswer()) {
         if ($this->_synchronization->isFixedSwitchVariant()) {
             $this->_fixedSwitchLogic();
         }
         if ($this->_synchronization->isFlexibilitySwitchVariant()) {
             $this->_flexibilitySwitchLogic();
         }
     } else {
         $this->_synchronization->setInMaster();
     }
 }
예제 #2
0
 /**
  * @return bool
  */
 protected function isFlexibility()
 {
     return $this->settings->isFlexibilitySwitchVariant();
 }