Class RegistrationServiceImpl
java.lang.Object
org.openwms.wms.registration.impl.RegistrationServiceImpl
- All Implemented Interfaces:
RegistrationService
A RegistrationServiceImpl.
- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.web.client.RestTemplate
private final org.springframework.context.ApplicationEventPublisher
private static final org.slf4j.Logger
private final ReplicaRegistryRepository
-
Constructor Summary
ConstructorsConstructorDescriptionRegistrationServiceImpl
(org.springframework.context.ApplicationEventPublisher eventPublisher, org.springframework.web.client.RestTemplate aLoadBalanced, ReplicaRegistryRepository repository) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
askForRemoval
(ReplicaRegistry srv, Collection<String> pKeys) boolean
registrarsExist
(@NotNull EntityType entityName) Checks if there are any registrars for the givenentityType
.void
remove
(@NotNull EntityType entityName, @NotBlank String pKey) Removes an entity of the specifiedentityType
and the given primary key.private void
remove
(ReplicaRegistry srv, Collection<String> pKeys)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
eventPublisher
private final org.springframework.context.ApplicationEventPublisher eventPublisher -
aLoadBalanced
private final org.springframework.web.client.RestTemplate aLoadBalanced -
repository
-
-
Constructor Details
-
RegistrationServiceImpl
RegistrationServiceImpl(org.springframework.context.ApplicationEventPublisher eventPublisher, org.springframework.web.client.RestTemplate aLoadBalanced, ReplicaRegistryRepository repository)
-
-
Method Details
-
registrarsExist
Checks if there are any registrars for the givenentityType
.- Specified by:
registrarsExist
in interfaceRegistrationService
- Parameters:
entityName
- The entity type to check.- Returns:
true
if registrars exist for the given entity type,false
otherwise.
-
remove
@Measured public void remove(@NotNull @NotNull EntityType entityName, @NotBlank @NotBlank String pKey) Removes an entity of the specifiedentityType
and the given primary key.- Specified by:
remove
in interfaceRegistrationService
- Parameters:
entityName
- The type of the entity to remove.pKey
- The primary key of the entity to remove.
-
askForRemoval
-
remove
-