public SolrClusterOperationsProxy(ISolrClusterBalancer clusterBalancer, SolrClusterExceptionHandlers exceptionHandlers, int maxAttempts, ISolrOperationsProvider operationsProvider, ISolrClusterReplicas usableReplicas)
 {
     this.clusterBalancer    = clusterBalancer;
     this.exceptionHandlers  = exceptionHandlers;
     this.maxAttempts        = maxAttempts;
     this.operationsProvider = operationsProvider;
     this.usableReplicas     = usableReplicas;
 }
Example #2
0
        public SolrCluster(string zooKeeperConnection, string collectionName, ISolrClusterBalancer clusterBalancer = null, int maxAttempts = 1)
        {
            this.clusterBalancer = clusterBalancer ?? new SolrClusterRandomBalancer();


            if (string.IsNullOrEmpty(zooKeeperConnection))
            {
                throw new ArgumentNullException("zooKeeperConnection");
            }

            this.maxAttempts         = maxAttempts;
            this.clusterBalancer     = clusterBalancer;
            this.zooKeeperConnection = zooKeeperConnection;
            exceptionHandlers        = new SolrClusterExceptionHandlers(this);
            operationsProvider       = new SolrOperationsProvider();

            syncLock = new object();
        }