private synchronized Hop getRecipient(RoutingContext ctx) {
        CacheEntry entry = update(ctx);
        if (entry.recipients.isEmpty()) {
            Hop hop = new Hop(ctx.getRoute().getHop(0));
            hop.setDirective(ctx.getDirectiveIndex(), new VerbatimDirective("*"));
            return hop;
        }
        if (++entry.offset >= entry.recipients.size()) {
            entry.offset = 0;
        }
        return new Hop(entry.recipients.get(entry.offset));
    }
Returns the appropriate recipient hop for the given routing context. This method provides synchronized access to
the internal cache.

@param ctx The routing context.
@return The recipient hop to use.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/protocol/LocalServicePolicy.java