Class ClientConfigurationBuilder
java.lang.Object
io.vanslog.spring.data.meilisearch.client.ClientConfigurationBuilder
A builder for Meilisearch
ClientConfiguration.- Author:
- Junghoon Ban
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build aClientConfigurationwith the given parameters.connectedTo(String hostUrl) Connect to the given hostUrl.Connect to localhost:7700.withApiKey(String apiKey) Configure API key to access Meilisearch instance.withClientAgents(String[] clientAgents) Configure client agents that will be sent with User-Agent header.withRequestInterval(int requestInterval) Configure request interval to wait for task to complete.withRequestTimeout(int requestTimeout) Configure request timeout to wait for task to complete.
-
Constructor Details
-
ClientConfigurationBuilder
public ClientConfigurationBuilder()Create a newClientConfigurationBuilder.
-
-
Method Details
-
connectedToLocalhost
Connect to localhost:7700.- Returns:
ClientConfigurationBuilder
-
connectedTo
Connect to the given hostUrl.- Parameters:
hostUrl- the hostUrl to connect to- Returns:
ClientConfigurationBuilder
-
withApiKey
Configure API key to access Meilisearch instance.- Parameters:
apiKey- the apiKey to use- Returns:
ClientConfigurationBuilder
-
withClientAgents
Configure client agents that will be sent with User-Agent header.- Parameters:
clientAgents- String array of client agents- Returns:
ClientConfigurationBuilder
-
withRequestTimeout
Configure request timeout to wait for task to complete.- Parameters:
requestTimeout- in milliseconds- Returns:
ClientConfigurationBuilder
-
withRequestInterval
Configure request interval to wait for task to complete.- Parameters:
requestInterval- in milliseconds- Returns:
ClientConfigurationBuilder
-
build
Build aClientConfigurationwith the given parameters.- Returns:
ClientConfiguration
-