PHP Class AppserverIo\Appserver\ServletEngine\StandardGarbageCollector

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

Méthodes publiques

Méthode 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 méthode

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

collectGarbage() public méthode

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

getApplication() public méthode

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

getDefaultTimeout() public méthode

Returns the default timeout.
public getDefaultTimeout ( ) : integer
Résultat integer The default timeout in microseconds

getLogger() public méthode

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
Résultat Psr\Log\LoggerInterface | null The logger with the requested name

getProfileLogger() public méthode

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

getSessionSettings() public méthode

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

getSystemLogger() public méthode

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

initialize() public méthode

Initializes and starts the garbage collector.
public initialize ( ) : void
Résultat void

injectApplication() public méthode

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

injectSessionSettings() public méthode

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

iterate() public méthode

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
Résultat void