Package org.apache.solr.common.cloud
Class SolrZkClient.Builder
- java.lang.Object
-
- org.apache.solr.common.cloud.SolrZkClient.Builder
-
- Enclosing class:
- SolrZkClient
public static class SolrZkClient.Builder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description BeforeReconnect
beforeReconnect
org.apache.solr.common.util.Compressor
compressor
ZkClientConnectionStrategy
connectionStrategy
ConnectionManager.IsClosed
higherLevelIsClosed
OnReconnect
onReconnect
org.apache.solr.common.cloud.SolrClassLoader
solrClassLoader
boolean
useDefaultCredsAndACLs
ZkACLProvider
zkACLProvider
int
zkClientConnectTimeout
int
zkClientTimeout
String
zkServerAddress
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SolrZkClient
build()
SolrZkClient.Builder
withAclProvider(ZkACLProvider zkACLProvider)
SolrZkClient.Builder
withBeforeConnect(BeforeReconnect beforeReconnect)
SolrZkClient.Builder
withClosedCheck(ConnectionManager.IsClosed higherLevelIsClosed)
SolrZkClient.Builder
withCompressor(org.apache.solr.common.util.Compressor c)
SolrZkClient.Builder
withConnStrategy(ZkClientConnectionStrategy strat)
SolrZkClient.Builder
withConnTimeOut(int zkConnectTimeout, TimeUnit unit)
Sets the Zk connection timeoutSolrZkClient.Builder
withReconnectListener(OnReconnect onReconnect)
SolrZkClient.Builder
withSolrClassLoader(org.apache.solr.common.cloud.SolrClassLoader solrClassLoader)
SolrZkClient.Builder
withStateFileCompression(int minStateByteLenForCompression, org.apache.solr.common.util.Compressor compressor)
If the state.json is greater than this many bytes and compression is enabled in solr.xml, then the data will be compressedSolrZkClient.Builder
withTimeout(int zkClientTimeout, TimeUnit unit)
Sets the Zk client session timeoutSolrZkClient.Builder
withUrl(String server)
SolrZkClient.Builder
withUseDefaultCredsAndACLs(boolean useDefaultCredsAndACLs)
-
-
-
Field Detail
-
zkServerAddress
public String zkServerAddress
-
zkClientTimeout
public int zkClientTimeout
-
zkClientConnectTimeout
public int zkClientConnectTimeout
-
onReconnect
public OnReconnect onReconnect
-
beforeReconnect
public BeforeReconnect beforeReconnect
-
connectionStrategy
public ZkClientConnectionStrategy connectionStrategy
-
zkACLProvider
public ZkACLProvider zkACLProvider
-
higherLevelIsClosed
public ConnectionManager.IsClosed higherLevelIsClosed
-
solrClassLoader
public org.apache.solr.common.cloud.SolrClassLoader solrClassLoader
-
useDefaultCredsAndACLs
public boolean useDefaultCredsAndACLs
-
compressor
public org.apache.solr.common.util.Compressor compressor
-
-
Method Detail
-
withUrl
public SolrZkClient.Builder withUrl(String server)
-
withTimeout
public SolrZkClient.Builder withTimeout(int zkClientTimeout, TimeUnit unit)
Sets the Zk client session timeout- Parameters:
zkClientTimeout
- timeout valueunit
- time unit
-
withStateFileCompression
public SolrZkClient.Builder withStateFileCompression(int minStateByteLenForCompression, org.apache.solr.common.util.Compressor compressor)
If the state.json is greater than this many bytes and compression is enabled in solr.xml, then the data will be compressed- Parameters:
minStateByteLenForCompression
- how big the state.json file can becompressor
- The compressor to use
-
withConnTimeOut
public SolrZkClient.Builder withConnTimeOut(int zkConnectTimeout, TimeUnit unit)
Sets the Zk connection timeout- Parameters:
zkConnectTimeout
- timeout valueunit
- time unit
-
withReconnectListener
public SolrZkClient.Builder withReconnectListener(OnReconnect onReconnect)
-
withConnStrategy
public SolrZkClient.Builder withConnStrategy(ZkClientConnectionStrategy strat)
-
withBeforeConnect
public SolrZkClient.Builder withBeforeConnect(BeforeReconnect beforeReconnect)
-
withAclProvider
public SolrZkClient.Builder withAclProvider(ZkACLProvider zkACLProvider)
-
withClosedCheck
public SolrZkClient.Builder withClosedCheck(ConnectionManager.IsClosed higherLevelIsClosed)
-
withCompressor
public SolrZkClient.Builder withCompressor(org.apache.solr.common.util.Compressor c)
-
withSolrClassLoader
public SolrZkClient.Builder withSolrClassLoader(org.apache.solr.common.cloud.SolrClassLoader solrClassLoader)
-
withUseDefaultCredsAndACLs
public SolrZkClient.Builder withUseDefaultCredsAndACLs(boolean useDefaultCredsAndACLs)
-
build
public SolrZkClient build()
-
-