Class RandomStrategy

  • All Implemented Interfaces:
    FailoverStrategy

    public class RandomStrategy
    extends AbstractStaticFailoverStrategy
    Failover strategy based on a randomized walk through the static cluster represented by multiple endpoints associated with the same service instance.
    • Constructor Detail

      • RandomStrategy

        public RandomStrategy()
        Constructor.
    • Method Detail

      • getNextAlternate

        protected <T> T getNextAlternate​(List<T> alternates)
        Get next alternate endpoint.
        Specified by:
        getNextAlternate in class AbstractStaticFailoverStrategy
        Parameters:
        alternates - non-empty List of alternate endpoints
        Returns: