Record Class EvitaClientConfiguration

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 of ReflectionLookup class 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 of time units client should wait for server to respond before throwing an exception or closing connection forcefully.
timeoutUnit - Time unit for property.
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
  • 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 a EvitaClientConfiguration record class.
      Parameters:
      clientId - the value for the clientId record component
      host - the value for the host record component
      port - the value for the port record component
      systemApiPort - the value for the systemApiPort record component
      useGeneratedCertificate - the value for the useGeneratedCertificate record component
      trustCertificate - the value for the trustCertificate record component
      tlsEnabled - the value for the tlsEnabled record component
      mtlsEnabled - the value for the mtlsEnabled record component
      rootCaCertificatePath - the value for the rootCaCertificatePath record component
      certificateFileName - the value for the certificateFileName record component
      certificateKeyFileName - the value for the certificateKeyFileName record component
      certificateKeyPassword - the value for the certificateKeyPassword record component
      certificateFolderPath - the value for the certificateFolderPath record component
      trustStorePassword - the value for the trustStorePassword record component
      reflectionLookupBehaviour - the value for the reflectionLookupBehaviour record component
      timeout - the value for the timeout record component
      timeoutUnit - the value for the timeoutUnit record component
      openTelemetryInstance - the value for the openTelemetryInstance record component
      trackedTaskLimit - the value for the trackedTaskLimit record component
  • Method Details

    • builder

      public static EvitaClientConfiguration.Builder builder()
      Builder for the cache options. Recommended to use to avoid binary compatibility problems in the future.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • clientId

      @Nonnull public String clientId()
      Returns the value of the clientId record component.
      Returns:
      the value of the clientId record component
    • host

      @Nonnull public String host()
      Returns the value of the host record component.
      Returns:
      the value of the host record component
    • port

      public int port()
      Returns the value of the port record component.
      Returns:
      the value of the port record component
    • systemApiPort

      public int systemApiPort()
      Returns the value of the systemApiPort record component.
      Returns:
      the value of the systemApiPort record component
    • useGeneratedCertificate

      public boolean useGeneratedCertificate()
      Returns the value of the useGeneratedCertificate record component.
      Returns:
      the value of the useGeneratedCertificate record component
    • trustCertificate

      public boolean trustCertificate()
      Returns the value of the trustCertificate record component.
      Returns:
      the value of the trustCertificate record component
    • tlsEnabled

      public boolean tlsEnabled()
      Returns the value of the tlsEnabled record component.
      Returns:
      the value of the tlsEnabled record component
    • mtlsEnabled

      public boolean mtlsEnabled()
      Returns the value of the mtlsEnabled record component.
      Returns:
      the value of the mtlsEnabled record component
    • rootCaCertificatePath

      @Nullable public Path rootCaCertificatePath()
      Returns the value of the rootCaCertificatePath record component.
      Returns:
      the value of the rootCaCertificatePath record component
    • certificateFileName

      @Nullable public Path certificateFileName()
      Returns the value of the certificateFileName record component.
      Returns:
      the value of the certificateFileName record component
    • certificateKeyFileName

      @Nullable public Path certificateKeyFileName()
      Returns the value of the certificateKeyFileName record component.
      Returns:
      the value of the certificateKeyFileName record component
    • certificateKeyPassword

      @Nullable public String certificateKeyPassword()
      Returns the value of the certificateKeyPassword record component.
      Returns:
      the value of the certificateKeyPassword record component
    • certificateFolderPath

      @Nullable public Path certificateFolderPath()
      Returns the value of the certificateFolderPath record component.
      Returns:
      the value of the certificateFolderPath record component
    • trustStorePassword

      @Nullable public String trustStorePassword()
      Returns the value of the trustStorePassword record component.
      Returns:
      the value of the trustStorePassword record component
    • reflectionLookupBehaviour

      @Nonnull public io.evitadb.dataType.data.ReflectionCachingBehaviour reflectionLookupBehaviour()
      Returns the value of the reflectionLookupBehaviour record component.
      Returns:
      the value of the reflectionLookupBehaviour record component
    • timeout

      public long timeout()
      Returns the value of the timeout record component.
      Returns:
      the value of the timeout record component
    • timeoutUnit

      @Nonnull public TimeUnit timeoutUnit()
      Returns the value of the timeoutUnit record component.
      Returns:
      the value of the timeoutUnit record component
    • openTelemetryInstance

      @Nullable public Object openTelemetryInstance()
      Returns the value of the openTelemetryInstance record component.
      Returns:
      the value of the openTelemetryInstance record component
    • trackedTaskLimit

      public int trackedTaskLimit()
      Returns the value of the trackedTaskLimit record component.
      Returns:
      the value of the trackedTaskLimit record component