public interface ServicesManager
Modifier and Type | Method and Description |
---|---|
default int |
count()
Return a count of loaded services by this manager.
|
RegisteredService |
delete(long id)
Delete the entry for this RegisteredService.
|
RegisteredService |
findServiceBy(long id)
Find a RegisteredService by matching with the supplied id.
|
java.util.Collection<RegisteredService> |
findServiceBy(java.util.function.Predicate<RegisteredService> clazz)
Find a collection of services by type.
|
RegisteredService |
findServiceBy(Service service)
Find a RegisteredService by matching with the supplied service.
|
<T extends RegisteredService> |
findServiceBy(Service serviceId,
java.lang.Class<T> clazz)
Find service by type.
|
RegisteredService |
findServiceBy(java.lang.String serviceId)
Find a RegisteredService by matching with the supplied service.
|
<T extends RegisteredService> |
findServiceBy(java.lang.String serviceId,
java.lang.Class<T> clazz)
Find service by type.
|
java.util.Collection<RegisteredService> |
getAllServices()
Retrieve the collection of all registered services.
|
void |
load()
Inform the ServicesManager to reload its list of services if its cached
them.
|
boolean |
matchesExistingService(Service service)
Convenience method to let one know if a service exists in the data store.
|
boolean |
matchesExistingService(java.lang.String service)
Convenience method to let one know if a service exists in the data store.
|
RegisteredService |
save(RegisteredService registeredService)
Register a service with CAS, or update an existing an entry.
|
RegisteredService save(RegisteredService registeredService)
registeredService
- the RegisteredService to update or add.RegisteredService delete(long id)
id
- the id of the registeredService to delete.RegisteredService findServiceBy(java.lang.String serviceId)
serviceId
- the service to match with.RegisteredService findServiceBy(Service service)
service
- the service to match with.java.util.Collection<RegisteredService> findServiceBy(java.util.function.Predicate<RegisteredService> clazz)
clazz
- the clazz<T extends RegisteredService> T findServiceBy(Service serviceId, java.lang.Class<T> clazz)
T
- the type parameterserviceId
- the service idclazz
- the clazz<T extends RegisteredService> T findServiceBy(java.lang.String serviceId, java.lang.Class<T> clazz)
T
- the type parameterserviceId
- the service idclazz
- the clazzRegisteredService findServiceBy(long id)
id
- the id to match with.java.util.Collection<RegisteredService> getAllServices()
boolean matchesExistingService(Service service)
service
- the service to check.boolean matchesExistingService(java.lang.String service)
service
- the service to check.void load()
default int count()