PHP Class AppserverIo\Appserver\ServletEngine\StandardGarbageCollector

Inheritance: extends AppserverIo\Appserver\Core\AbstractDaemonThread, implements AppserverIo\Appserver\ServletEngine\GarbageCollectorInterface
Show file Open project: appserver-io/appserver Class Usage Examples

Public Methods

Method Description
bootstrap ( ) : void This method will be invoked before the while() loop starts and can be used to implement some bootstrap functionality.
collectGarbage ( ) : integer Collects the session garbage.
getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface Return's the application instance.
getDefaultTimeout ( ) : integer Returns the default timeout.
getLogger ( string $loggerName ) : Psr\Log\LoggerInterface | null Return's the logger with the requested name. First we look in the application and then in the system itself.
getProfileLogger ( ) : Psr\Log\LoggerInterface | null Return's the profile logger instance.
getSessionSettings ( ) : AppserverIo\Appserver\ServletEngine\SessionSettingsInterface Returns the session settings.
getSystemLogger ( ) : Psr\Log\LoggerInterface | null Return's the system logger instance.
initialize ( ) : void Initializes and starts the garbage collector.
injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Injects the application instance.
injectSessionSettings ( AppserverIo\Appserver\ServletEngine\SessionSettingsInterface $sessionSettings ) : void Injects the session settings.
iterate ( integer $timeout ) : void This is invoked on every iteration of the daemons while() loop.

Method Details

bootstrap() public method

This method will be invoked before the while() loop starts and can be used to implement some bootstrap functionality.
public bootstrap ( ) : void
return void

collectGarbage() public method

Collects the session garbage.
public collectGarbage ( ) : integer
return integer The number of expired and removed sessions

getApplication() public method

Return's the application instance.
public getApplication ( ) : AppserverIo\Psr\Application\ApplicationInterface
return AppserverIo\Psr\Application\ApplicationInterface The application instance

getDefaultTimeout() public method

Returns the default timeout.
public getDefaultTimeout ( ) : integer
return integer The default timeout in microseconds

getLogger() public method

Return's the logger with the requested name. First we look in the application and then in the system itself.
public getLogger ( string $loggerName ) : Psr\Log\LoggerInterface | null
$loggerName string The name of the logger to return
return Psr\Log\LoggerInterface | null The logger with the requested name

getProfileLogger() public method

Return's the profile logger instance.
public getProfileLogger ( ) : Psr\Log\LoggerInterface | null
return Psr\Log\LoggerInterface | null The profile logger insatnce

getSessionSettings() public method

Returns the session settings.
public getSessionSettings ( ) : AppserverIo\Appserver\ServletEngine\SessionSettingsInterface
return AppserverIo\Appserver\ServletEngine\SessionSettingsInterface The session settings

getSystemLogger() public method

Return's the system logger instance.
public getSystemLogger ( ) : Psr\Log\LoggerInterface | null
return Psr\Log\LoggerInterface | null The system logger insatnce

initialize() public method

Initializes and starts the garbage collector.
public initialize ( ) : void
return void

injectApplication() public method

Injects the application instance.
public injectApplication ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
return void

injectSessionSettings() public method

Injects the session settings.
public injectSessionSettings ( AppserverIo\Appserver\ServletEngine\SessionSettingsInterface $sessionSettings ) : void
$sessionSettings AppserverIo\Appserver\ServletEngine\SessionSettingsInterface Settings for the session handling
return void

iterate() public method

This is invoked on every iteration of the daemons while() loop.
public iterate ( integer $timeout ) : void
$timeout integer The timeout before the daemon wakes up
return void