Class SiteStatus


  • public class SiteStatus
    extends java.lang.Object
    Maintains the status of sites (up, down, undefined). This weeds out duplicate up or down notifications
    Since:
    5.2.17
    Author:
    Bela Ban
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SiteStatus.Status  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<java.lang.String,​SiteStatus.Status> sites  
    • Constructor Summary

      Constructors 
      Constructor Description
      SiteStatus()  
    • Field Detail

    • Constructor Detail

      • SiteStatus

        public SiteStatus()
    • Method Detail

      • add

        public java.util.Set<java.lang.String> add​(java.util.Set<java.lang.String> sites,
                                                   SiteStatus.Status status)
        Adds a set of sites to the cache. Returns a set of sites for which notifications should be emitted. For each site S, the following happens:
          - S is not present: add a new entry with the given status for S and add S to the return value
          - S is present: if S != status: change the status and add S to the return value, else no-op
         
        Parameters:
        sites -
        status -
        Returns:
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object