21 package com.griddynamics.jagger.invoker;
23 import org.slf4j.Logger;
24 import org.slf4j.LoggerFactory;
29 public abstract class PairSupplierFactoryLoadBalancer<Q, E>
extends QueryPoolLoadBalancer<Q, E> {
31 private final static Logger logger = LoggerFactory.getLogger(PairSupplierFactoryLoadBalancer.class);
32 private PairSupplierFactory<Q, E> pairSupplierFactory;
33 private PairSupplier<Q, E> pairSupplier;
36 this.pairSupplierFactory = pairSupplierFactory;
40 if (endpointProvider == null){
41 throw new NullPointerException(
"Init endpoint provider!");
43 if (queryProvider == null) {
44 logger.debug(
"Query provider is null!");
47 if (pairSupplier == null){
48 pairSupplier = pairSupplierFactory.create(queryProvider, endpointProvider);