Class ReconnectLocationPool

  • public class ReconnectLocationPool
    extends java.lang.Object
    Manages the list of available reconnect entries that are used to connect and recover a connection.
    • Method Detail

      • size

        public int size()
        the current size of the entry pool.
      • isEmpty

        public boolean isEmpty()
        true if the entry pool is empty.
      • getNext

        public ReconnectLocation getNext()
        Returns the next entry in the pool of entries. The entry will be shifted to the end of the list and not be attempted again until the full list has been returned once.
        the next entry that should be used for a connection attempt.
      • shuffle

        public void shuffle()
        Randomizes the order of the list of entries contained within the pool.
      • add

        public void add​(ReconnectLocation entry)
        Adds a new entry to the pool if not already contained within.
        entry - The new ReconnectLocation to add to the pool.
      • removeAll

        public void removeAll()
        Removes all currently configured ReconnectLocation from the pool, no new ReconnectLocation values will be served from this pool until new ones are added.
      • replaceAll

        public void replaceAll​(java.util.List<ReconnectLocation> replacements)
        Removes all currently configured ReconnectLocation values from the pool and replaces them with the new set given.
        replacements - The new set of reconnect ReconnectLocation values to serve from this pool.
      • toString

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