Class RegistrationServiceImpl

java.lang.Object
org.openwms.wms.registration.impl.RegistrationServiceImpl
All Implemented Interfaces:
RegistrationService

@TxService class RegistrationServiceImpl extends Object implements RegistrationService
A RegistrationServiceImpl.
Author:
Heiko Scherrer
  • 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

      private final ReplicaRegistryRepository repository
  • Constructor Details

    • RegistrationServiceImpl

      RegistrationServiceImpl(org.springframework.context.ApplicationEventPublisher eventPublisher, org.springframework.web.client.RestTemplate aLoadBalanced, ReplicaRegistryRepository repository)
  • Method Details

    • registrarsExist

      @Measured public boolean registrarsExist(@NotNull @NotNull EntityType entityName)
      Checks if there are any registrars for the given entityType.
      Specified by:
      registrarsExist in interface RegistrationService
      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 specified entityType and the given primary key.
      Specified by:
      remove in interface RegistrationService
      Parameters:
      entityName - The type of the entity to remove.
      pKey - The primary key of the entity to remove.
    • askForRemoval

      private void askForRemoval(ReplicaRegistry srv, Collection<String> pKeys)
    • remove

      private void remove(ReplicaRegistry srv, Collection<String> pKeys)