コード例 #1
0
 /**
  * Check is server information out dated.
  *
  * @param oxApplicationServer $oServer
  *
  * @return bool
  */
 private function _isValid($oServer)
 {
     return $oServer->getTimestamp() - $this->_getCurrentTime() + self::NODE_VALIDITY_TIME > 0;
 }
コード例 #2
0
 /**
  * Saves given server information to config.
  *
  * @param oxApplicationServer $oServer
  */
 public function saveServer($oServer)
 {
     $aServersData = $this->_getServersData();
     $aServersData[$oServer->getId()] = array('id' => $oServer->getId(), 'timestamp' => $oServer->getTimestamp(), 'ip' => $oServer->getIp(), 'lastFrontendUsage' => $oServer->getLastFrontendUsage(), 'lastAdminUsage' => $oServer->getLastAdminUsage(), 'isValid' => $oServer->isValid());
     $this->_save($aServersData);
 }