OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer Class Reference
+ Collaboration diagram for OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer:

Public Member Functions

 setId ($id)
 
 getId ()
 
 setIp ($ip)
 
 getIp ()
 
 setTimestamp ($timestamp)
 
 getTimestamp ()
 
 setLastAdminUsage ($lastAdminUsage)
 
 getLastAdminUsage ()
 
 setLastFrontendUsage ($lastFrontendUsage)
 
 getLastFrontendUsage ()
 
 isInUse ($currentTimestamp)
 
 needToDelete ($currentTimestamp)
 
 needToUpdate ($currentTimestamp)
 

Public Attributes

const SERVER_INFORMATION_TIME_LIFE = 86400
 
const INACTIVE_SERVER_STORAGE_PERIOD = 259200
 
const SERVER_INFO_UPDATE_PERIOD = 86400
 

Private Member Functions

 isServerTimeValid ($currentTimestamp)
 
 hasLifetimeExpired ($currentTimestamp, $periodTimestamp)
 

Private Attributes

 $id
 
 $ip
 
 $timestamp
 
 $lastFrontendUsage
 
 $lastAdminUsage
 

Detailed Description

Class used as entity for server node information.

Member Function Documentation

◆ getId()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::getId ( )

Gets id

Returns
string

◆ getIp()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::getIp ( )

Gets ip.

Returns
string

◆ getLastAdminUsage()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::getLastAdminUsage ( )

Gets last admin usage.

Returns
int|null

◆ getLastFrontendUsage()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::getLastFrontendUsage ( )

Gets last frontend usage.

Returns
int|null Frontend server flag which stores timestamp.

◆ getTimestamp()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::getTimestamp ( )

Gets timestamp.

Returns
int

◆ hasLifetimeExpired()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::hasLifetimeExpired (   $currentTimestamp,
  $periodTimestamp 
)
private

Compare if the application server lifetime has exceeded given period.

Parameters
int$currentTimestampThe current timestamp.
int$periodTimestampThe timestamp of period to check.
Returns
bool

◆ isInUse()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::isInUse (   $currentTimestamp)

Check if application server was in use during 24h period.

Parameters
int$currentTimestampThe current timestamp.
Returns
bool

◆ isServerTimeValid()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::isServerTimeValid (   $currentTimestamp)
private

Method checks if the hardware time was not rolled back.

Parameters
int$currentTimestampThe current timestamp.
Returns
bool

◆ needToDelete()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::needToDelete (   $currentTimestamp)

Check if application server availability check period is over.

Parameters
int$currentTimestampThe current timestamp.
Returns
bool

◆ needToUpdate()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::needToUpdate (   $currentTimestamp)

Check if application server information must be updated.

Parameters
int$currentTimestampThe current timestamp.
Returns
bool

◆ setId()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::setId (   $id)

Sets id.

Parameters
string$id

◆ setIp()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::setIp (   $ip)

Sets ip.

Parameters
string$ip

◆ setLastAdminUsage()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::setLastAdminUsage (   $lastAdminUsage)

Sets last admin usage.

Parameters
int | null$lastAdminUsage

◆ setLastFrontendUsage()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::setLastFrontendUsage (   $lastFrontendUsage)

Sets last frontend usage.

Parameters
int | null$lastFrontendUsageAdmin server flag which stores timestamp.

◆ setTimestamp()

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::setTimestamp (   $timestamp)

Sets timestamp.

Parameters
int$timestamp

Member Data Documentation

◆ $id

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::$id
private

◆ $ip

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::$ip
private

◆ $lastAdminUsage

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::$lastAdminUsage
private

◆ $lastFrontendUsage

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::$lastFrontendUsage
private

◆ $timestamp

OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::$timestamp
private

◆ INACTIVE_SERVER_STORAGE_PERIOD

const OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::INACTIVE_SERVER_STORAGE_PERIOD = 259200

Time in seconds, how long inactive server information will be stored.

◆ SERVER_INFO_UPDATE_PERIOD

const OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::SERVER_INFO_UPDATE_PERIOD = 86400

Time in seconds, how often server information must be updated.

◆ SERVER_INFORMATION_TIME_LIFE

const OxidEsales\EshopCommunity\Core\DataObject\ApplicationServer::SERVER_INFORMATION_TIME_LIFE = 86400

Time in seconds, active server information life time.


The documentation for this class was generated from the following file: