Host Events Service

@Service
open class HostEventsService : BrownieEventsRecorder<T, E>

The HostEventsService class is useful to manage all the HostHistoryEvent database operations

Author

N7ghtm4r3 - Tecknobit

See also

Constructors

Link copied to clipboard
@Autowired
protected constructor(hostEventsRepository: HostEventsRepository)
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
Method used to register the RESTARTED event
Link copied to clipboard
Method used to register a change of the status of a host
Link copied to clipboard
open fun registerServiceAddedEvent(hostId: String, serviceName: String)
Method used to register the SERVICE_ADDED event
Link copied to clipboard
open fun registerServiceRemovedEvent(hostId: String, serviceName: String, removeFromTheHost: Boolean)
Method used to register the SERVICE_REMOVED event