Class SiteStatus

java.lang.Object
org.jgroups.protocols.relay.SiteStatus

public class SiteStatus extends Object
Maintains the status of sites (up, down, undefined). This weeds out duplicate up or down notifications
Since:
5.2.17
  • Field Details

  • Constructor Details

    • SiteStatus

      public SiteStatus()
  • Method Details

    • add

      public Set<String> add(Set<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:
    • get

      public SiteStatus.Status get(String site)
    • clear

      public SiteStatus clear()
    • toString

      public String toString()
      Overrides:
      toString in class Object