Class ServiceModule
java.lang.Object
io.quarkus.hibernate.orm.panache.PanacheEntityBase
ai.pipestream.registration.entity.ServiceModule
@Entity
public class ServiceModule
extends io.quarkus.hibernate.orm.panache.PanacheEntityBase
Entity representing a registered service module in the system.
This is the system of record for all service registrations.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ServiceModuleCreates a new ServiceModule instance.static StringgenerateServiceId(String serviceName, String host, int port) Generates a unique service ID.booleanChecks if the service is healthy based on heartbeat.voidUpdates the last heartbeat timestamp.Methods inherited from class io.quarkus.hibernate.orm.panache.PanacheEntityBase
count, count, count, count, delete, delete, delete, delete, deleteAll, deleteById, find, find, find, find, find, find, findAll, findAll, findById, findById, findByIdOptional, findByIdOptional, findByIds, flush, getEntityManager, getSession, isPersistent, list, list, list, list, list, list, listAll, listAll, persist, persist, persist, persist, persistAndFlush, stream, stream, stream, stream, stream, stream, streamAll, streamAll, update, update, update
-
Field Details
-
serviceId
-
serviceName
-
host
-
port
-
version
-
configSchemaId
-
metadata
-
registeredAt
-
lastHeartbeat
-
status
-
-
Constructor Details
-
ServiceModule
public ServiceModule()
-
-
Method Details
-
create
Creates a new ServiceModule instance.- Parameters:
serviceName- the name of the servicehost- the host addressport- the port number- Returns:
- the created ServiceModule
-
generateServiceId
-
updateHeartbeat
public void updateHeartbeat()Updates the last heartbeat timestamp. -
isHealthy
public boolean isHealthy()Checks if the service is healthy based on heartbeat.- Returns:
- true if healthy, false otherwise
-