59 $aServersData[$oServer->getId()] = array(
60 'id' => $oServer->getId(),
61 'timestamp' => $oServer->getTimestamp(),
62 'ip' => $oServer->getIp(),
63 'lastFrontendUsage' => $oServer->getLastFrontendUsage(),
64 'lastAdminUsage' => $oServer->getLastAdminUsage(),
65 'isValid' => $oServer->isValid()
68 $this->
_save($aServersData);
92 return array_key_exists($sServerId, $aServers) ? $aServers[$sServerId] : array();
106 $oAppServer =
oxNew(
'oxApplicationServer');
108 $oAppServer->setId($sServerId);
111 $oAppServer->setLastFrontendUsage($this->
_getServerParameter($aData,
'lastFrontendUsage'));
128 return array_key_exists($sName, $aData) ? $aData[$sName] : null;
142 $aValidServers = array();
144 foreach ($aServers as $aServer) {
145 if ($aServer[
'isValid']) {
146 unset($aServer[
'isValid']);
147 unset($aServer[
'timestamp']);
148 $aValidServers[] = $aServer;
152 return $aValidServers;
163 unset($aServersData[$sServerId]);
164 $this->
_save($aServersData);
174 foreach ($aServersData as $sServerId => $aServerData) {
175 if ($aServerData[
'timestamp'] <
oxRegistry::get(
"oxUtilsDate")->getTime() - self::NODE_AVAILABILITY_CHECK_PERIOD) {
177 $oServer->setIsValid(
false);
190 foreach ($aServersData as $sServerId => $aServerData) {
191 if ($aServerData[
'timestamp'] <
oxRegistry::get(
"oxUtilsDate")->getTime() - self::INACTIVE_NODE_STORAGE_PERIOD) {
202 protected function _save($aServersData)
205 $this->_aServersData = $aServersData;