public AtomicLong getNextIndex ( String virtualHostname , boolean secure ) { Map < String , VipIndexSupport > index = ( secure ) ? secureVirtualHostNameAppMap : virtualHostNameAppMap ; return Optional . ofNullable ( index . get ( virtualHostname . toUpperCase ( Locale . ROOT ) ) ) . map ( VipIndexSupport :: getRoundRobinIndex ) . orElse ( null ) ; }
Gets the next round - robin index for the given virtual host name . This index is reset after every registry fetch cycle .