Class IncomingPingService

java.lang.Object
com.bluebell.greenhouse.radicle.services.system.IncomingPingService

@Service @Transactional(readOnly=true) public class IncomingPingService extends Object
Service-layer for IncomingPing.
Version:
2.0.6
Author:
Stephen Prizio
  • Constructor Details

    • IncomingPingService

      public IncomingPingService()
  • Method Details

    • findLatestBySystemName

      public Optional<IncomingPing> findLatestBySystemName(String systemName)
      Looks for the most recent IncomingPing for the given system name.
      Parameters:
      systemName - system name
      Returns:
      Optional IncomingPing
    • findAllBySystemName

      public List<IncomingPing> findAllBySystemName(String systemName)
      Looks for all IncomingPings for the given system name.
      Parameters:
      systemName - system name
      Returns:
      List of IncomingPing
    • checkMiddlewareHealth

      public org.javatuples.Pair<Boolean,String> checkMiddlewareHealth(IncomingPingType incomingPingType)
      Checks the health of the given middleware based on its most recent incoming ping.
      Parameters:
      incomingPingType - IncomingPingType
      Returns:
      Pair
    • checkAllMiddlewareHealth

      public org.javatuples.Pair<Boolean,String> checkAllMiddlewareHealth()
      Checks the health of all middleware incoming ping types in configured execution order.
      Returns:
      Pair
    • acknowledgeIncomingPing

      @Transactional public boolean acknowledgeIncomingPing(String systemName, IncomingPingType incomingPingType)
      Acknowledges the incoming ping and saves it to the database.
      Parameters:
      systemName - system name
      incomingPingType - incoming ping type
      Returns:
      true if ping received and acknowledged
    • deleteOldIncomingPings

      @Transactional public int deleteOldIncomingPings()
      Deletes incoming pings that are older than the configured retention period.
      Returns:
      number of deleted incoming pings