Host Service Events Service

The HostServiceEventsService class is useful to manage all the ServiceEvent database operations

Author

N7ghtm4r3 - Tecknobit

See also

Constructors

Link copied to clipboard
@Autowired
constructor(eventsRepository: HostServiceEventsRepository)
Constructor to instantiate the service

Properties

Link copied to clipboard
repository instance used to register the events in the dedicated tables

Functions

Link copied to clipboard
protected open fun calculateUpDays(eventOwnerId: String): Long
Method used to calculate the up days since the last up event
Link copied to clipboard
protected open fun registerEvent(type: T, eventOwnerId: String)
Method used to register any T event
protected open fun registerEvent(type: T, eventOwnerId: String, extra: Any)
Method used to register any E event
Link copied to clipboard
open fun registerServiceRebooted(serviceId: String)
Method used to register the REBOOTING event
Link copied to clipboard
open fun registerServiceRestarted(serviceId: String, pid: Long)
Method used to register the RESTARTED event
Link copied to clipboard
open fun registerServiceStarted(serviceId: String, pid: Long)
Method used to register the RUNNING event
Link copied to clipboard
open fun registerServiceStopped(serviceId: String)
Method used to register the STOPPED event