java.lang.Object
java.lang.Record
io.evitadb.driver.config.EvitaClientConfiguration
- Record Components:
clientId- The identification of the client.host- The IP address or host name where the gRPC server listens.port- The port the gRPC server listens on.systemApiPort- The port the system API server listens on.useGeneratedCertificate- Whether to use generated certificate by the server for the connection or not.trustCertificate- Whether to trust the server CA certificate or not when it's not trusted CA.tlsEnabled- Whether to use HTTP/2 without TLS encryption. Corresponding setting must be set on the server side.mtlsEnabled- Whether to use mutual TLS encryption. Corresponding setting must be set on the server side.rootCaCertificatePath- A relative path to the root CA certificate. Has to be provided when `useGeneratedCertificate` and `trustCertificate` flag is disabled and server is using non-trusted CA certificate.certificateFolderPath- A relative path to the folder where the client certificate and private key will be located, or if already not present there, downloaded. In the latter, the default path in the `temp` folder will be used.reflectionLookupBehaviour- The behaviour ofReflectionLookupclass analyzing classes for reflective information. Controls whether the once analyzed reflection information should be cached or freshly (and costly) retrieved each time asked.timeout- Number oftime unitsclient should wait for server to respond before throwing an exception or closing connection forcefully.timeoutUnit- Time unit forproperty.trackedTaskLimit- The maximum number of server tasks that can be tracked by the client.
public record EvitaClientConfiguration(@Nonnull String clientId, @Nonnull String host, int port, int systemApiPort, boolean useGeneratedCertificate, boolean trustCertificate, boolean tlsEnabled, boolean mtlsEnabled, @Nullable Path rootCaCertificatePath, @Nullable Path certificateFileName, @Nullable Path certificateKeyFileName, @Nullable String certificateKeyPassword, @Nullable Path certificateFolderPath, @Nullable String trustStorePassword, @Nonnull io.evitadb.dataType.data.ReflectionCachingBehaviour reflectionLookupBehaviour, long timeout, @Nonnull TimeUnit timeoutUnit, @Nullable Object openTelemetryInstance, int trackedTaskLimit)
extends Record
This is a configuration class for the
EvitaClient. It allows to configure the basic
setting necessary for client to run.- Author:
- Jan Novotný (novotny@fg.cz), FG Forrest a.s. (c) 2022
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStandard builder pattern implementation. -
Constructor Summary
ConstructorsConstructorDescriptionEvitaClientConfiguration(String clientId, String host, int port, int systemApiPort, boolean useGeneratedCertificate, boolean trustCertificate, boolean tlsEnabled, boolean mtlsEnabled, Path rootCaCertificatePath, Path certificateFileName, Path certificateKeyFileName, String certificateKeyPassword, Path certificateFolderPath, String trustStorePassword, io.evitadb.dataType.data.ReflectionCachingBehaviour reflectionLookupBehaviour, long timeout, TimeUnit timeoutUnit, Object openTelemetryInstance, int trackedTaskLimit) Creates an instance of aEvitaClientConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Builder for the cache options.Returns the value of thecertificateFileNamerecord component.Returns the value of thecertificateFolderPathrecord component.Returns the value of thecertificateKeyFileNamerecord component.Returns the value of thecertificateKeyPasswordrecord component.clientId()Returns the value of theclientIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.host()Returns the value of thehostrecord component.booleanReturns the value of themtlsEnabledrecord component.Returns the value of theopenTelemetryInstancerecord component.intport()Returns the value of theportrecord component.io.evitadb.dataType.data.ReflectionCachingBehaviourReturns the value of thereflectionLookupBehaviourrecord component.Returns the value of therootCaCertificatePathrecord component.intReturns the value of thesystemApiPortrecord component.longtimeout()Returns the value of thetimeoutrecord component.Returns the value of thetimeoutUnitrecord component.booleanReturns the value of thetlsEnabledrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetrackedTaskLimitrecord component.booleanReturns the value of thetrustCertificaterecord component.Returns the value of thetrustStorePasswordrecord component.booleanReturns the value of theuseGeneratedCertificaterecord component.
-
Constructor Details
-
EvitaClientConfiguration
public EvitaClientConfiguration(@Nonnull String clientId, @Nonnull String host, int port, int systemApiPort, boolean useGeneratedCertificate, boolean trustCertificate, boolean tlsEnabled, boolean mtlsEnabled, @Nullable Path rootCaCertificatePath, @Nullable Path certificateFileName, @Nullable Path certificateKeyFileName, @Nullable String certificateKeyPassword, @Nullable Path certificateFolderPath, @Nullable String trustStorePassword, @Nonnull io.evitadb.dataType.data.ReflectionCachingBehaviour reflectionLookupBehaviour, long timeout, @Nonnull TimeUnit timeoutUnit, @Nullable Object openTelemetryInstance, int trackedTaskLimit) Creates an instance of aEvitaClientConfigurationrecord class.- Parameters:
clientId- the value for theclientIdrecord componenthost- the value for thehostrecord componentport- the value for theportrecord componentsystemApiPort- the value for thesystemApiPortrecord componentuseGeneratedCertificate- the value for theuseGeneratedCertificaterecord componenttrustCertificate- the value for thetrustCertificaterecord componenttlsEnabled- the value for thetlsEnabledrecord componentmtlsEnabled- the value for themtlsEnabledrecord componentrootCaCertificatePath- the value for therootCaCertificatePathrecord componentcertificateFileName- the value for thecertificateFileNamerecord componentcertificateKeyFileName- the value for thecertificateKeyFileNamerecord componentcertificateKeyPassword- the value for thecertificateKeyPasswordrecord componentcertificateFolderPath- the value for thecertificateFolderPathrecord componenttrustStorePassword- the value for thetrustStorePasswordrecord componentreflectionLookupBehaviour- the value for thereflectionLookupBehaviourrecord componenttimeout- the value for thetimeoutrecord componenttimeoutUnit- the value for thetimeoutUnitrecord componentopenTelemetryInstance- the value for theopenTelemetryInstancerecord componenttrackedTaskLimit- the value for thetrackedTaskLimitrecord component
-
-
Method Details
-
builder
Builder for the cache options. Recommended to use to avoid binary compatibility problems in the future. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
clientId
Returns the value of theclientIdrecord component.- Returns:
- the value of the
clientIdrecord component
-
host
Returns the value of thehostrecord component.- Returns:
- the value of the
hostrecord component
-
port
public int port()Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
systemApiPort
public int systemApiPort()Returns the value of thesystemApiPortrecord component.- Returns:
- the value of the
systemApiPortrecord component
-
useGeneratedCertificate
public boolean useGeneratedCertificate()Returns the value of theuseGeneratedCertificaterecord component.- Returns:
- the value of the
useGeneratedCertificaterecord component
-
trustCertificate
public boolean trustCertificate()Returns the value of thetrustCertificaterecord component.- Returns:
- the value of the
trustCertificaterecord component
-
tlsEnabled
public boolean tlsEnabled()Returns the value of thetlsEnabledrecord component.- Returns:
- the value of the
tlsEnabledrecord component
-
mtlsEnabled
public boolean mtlsEnabled()Returns the value of themtlsEnabledrecord component.- Returns:
- the value of the
mtlsEnabledrecord component
-
rootCaCertificatePath
Returns the value of therootCaCertificatePathrecord component.- Returns:
- the value of the
rootCaCertificatePathrecord component
-
certificateFileName
Returns the value of thecertificateFileNamerecord component.- Returns:
- the value of the
certificateFileNamerecord component
-
certificateKeyFileName
Returns the value of thecertificateKeyFileNamerecord component.- Returns:
- the value of the
certificateKeyFileNamerecord component
-
certificateKeyPassword
Returns the value of thecertificateKeyPasswordrecord component.- Returns:
- the value of the
certificateKeyPasswordrecord component
-
certificateFolderPath
Returns the value of thecertificateFolderPathrecord component.- Returns:
- the value of the
certificateFolderPathrecord component
-
trustStorePassword
Returns the value of thetrustStorePasswordrecord component.- Returns:
- the value of the
trustStorePasswordrecord component
-
reflectionLookupBehaviour
@Nonnull public io.evitadb.dataType.data.ReflectionCachingBehaviour reflectionLookupBehaviour()Returns the value of thereflectionLookupBehaviourrecord component.- Returns:
- the value of the
reflectionLookupBehaviourrecord component
-
timeout
public long timeout()Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
timeoutUnit
Returns the value of thetimeoutUnitrecord component.- Returns:
- the value of the
timeoutUnitrecord component
-
openTelemetryInstance
Returns the value of theopenTelemetryInstancerecord component.- Returns:
- the value of the
openTelemetryInstancerecord component
-
trackedTaskLimit
public int trackedTaskLimit()Returns the value of thetrackedTaskLimitrecord component.- Returns:
- the value of the
trackedTaskLimitrecord component
-