Class ClientConfig

    • Constructor Detail

      • ClientConfig

        public ClientConfig()
    • Method Detail

      • getSdkIdentifier

        public abstract String getSdkIdentifier()
      • getAppIdentifier

        public abstract String getAppIdentifier()
      • getSessionIdentifier

        public abstract String getSessionIdentifier()
      • getMaxRetries

        public abstract int getMaxRetries()
      • getNoWorkers

        public abstract int getNoWorkers()
      • getNoListPartitions

        public abstract int getNoListPartitions()
      • getUpsertMode

        public abstract UpsertMode getUpsertMode()
      • getEntityMatchingMaxBatchSize

        public abstract int getEntityMatchingMaxBatchSize()
      • withAppIdentifier

        public ClientConfig withAppIdentifier​(String identifier)
        Set the app identifier. The identifier is encoded in the api calls to the Cognite instance and can be used for tracing and statistics.
        Parameters:
        identifier - the application identifier
        Returns:
        the ClientConfig with the setting applied
      • withSessionIdentifier

        public ClientConfig withSessionIdentifier​(String identifier)
        Set the session identifier. The identifier is encoded in the api calls to the Cognite instance and can be used for tracing and statistics.
        Parameters:
        identifier - the session identifier
        Returns:
        the ClientConfig with the setting applied
      • withMaxRetries

        public ClientConfig withMaxRetries​(int retries)
        Sets the maximum number of retries when sending requests to the Cognite API. The default setting is 5. This should be sufficient for most scenarios.
        Parameters:
        retries - the ClientConfig with the setting applied
        Returns:
        the ClientConfig with the setting applied
      • withNoWorkers

        public ClientConfig withNoWorkers​(int noWorkers)
        Specifies the maximum number of workers to use for the Cognite API requests. The default setting is eight workers per (virtual) CPU core.
        Parameters:
        noWorkers - max number of workers
        Returns:
        the ClientConfig with the setting applied
      • withNoListPartitions

        public ClientConfig withNoListPartitions​(int noPartitions)
        Specifies the number of partitions to use for (read) list requests. This represents the number of parallel streams to use for reading the results of list requests. The default setting is eight partitions.
        Parameters:
        noPartitions - the number of partitions for list requests
        Returns:
        the ClientConfig with the setting applied
      • withUpsertMode

        public ClientConfig withUpsertMode​(UpsertMode mode)
        Sets the upsert mode. When the data object to write does not exist, the writer will always create it. But, if the object already exist, the writer can update the the existing object in one of two ways: update or replace. UpsertMode.UPDATE will update the provided fields in the target object--all other fields will remain unchanged. UpsertMode.REPLACE will replace the entire target object with the provided fields (id and externalId will remain unchanged).
        Parameters:
        mode - the upsert mode
        Returns:
        the ClientConfig with the setting applied
      • withEntityMatchingMaxBatchSize

        public ClientConfig withEntityMatchingMaxBatchSize​(int value)
        Sets the max batch size when executing entity matching operations.
        Parameters:
        value -
        Returns: