Class OciMetricsSupport.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • initialDelay

        public OciMetricsSupport.Builder initialDelay​(long value)
        Sets the initial delay before metrics are sent to OCI (defaults to 1L).
        Parameters:
        value - initial delay, expressed in time units set by schedulingTimeUnit(TimeUnit)
        Returns:
        updated builder
      • batchDelay

        public OciMetricsSupport.Builder batchDelay​(long value)
        Sets the delay interval if metrics are posted in batches (defaults to 1L).
        Parameters:
        value - batch delay, expressed in time units set by schedulingTimeUnit(TimeUnit)
        Returns:
        updated builder
      • schedulingTimeUnit

        public OciMetricsSupport.Builder schedulingTimeUnit​(TimeUnit timeUnit)
        Sets the time unit applied to the initial delay and delay values (defaults to TimeUnit.SECONDS).
        Parameters:
        timeUnit - unit of time
        Returns:
        updated builder
      • compartmentId

        public OciMetricsSupport.Builder compartmentId​(String value)
        Sets the compartment ID.
        Parameters:
        value - compartment ID
        Returns:
        updated builder
      • resourceGroup

        public OciMetricsSupport.Builder resourceGroup​(String value)
        Sets the resource group.
        Parameters:
        value - resource group
        Returns:
        updated builder
      • descriptionEnabled

        public OciMetricsSupport.Builder descriptionEnabled​(boolean value)
        Sets whether the description should be enabled or not.

        Defaults to true.

        Parameters:
        value - enabled
        Returns:
        updated builder
      • scopes

        public OciMetricsSupport.Builder scopes​(String[] value)
        Sets which metrics scopes (e.g., base, vendor, application) should be sent to OCI.

        If this method is never invoked, defaults to all scopes.

        Parameters:
        value - array of metric scopes to process
        Returns:
        updated builder
      • enabled

        public OciMetricsSupport.Builder enabled​(boolean value)
        Sets whether metrics transmission to OCI is enabled.

        Defaults to true.

        Parameters:
        value - whether metrics transmission should be enabled
        Returns:
        updated builder
      • batchSize

        public OciMetricsSupport.Builder batchSize​(int value)
        Sets the maximum no. of metrics to send in a batch (defaults to 50).
        Parameters:
        value - maximum no. of metrics to send in a batch
        Returns:
        updated builder
      • config

        public OciMetricsSupport.Builder config​(Config config)
        Updates the builder using the specified OCI metrics Config node.
        Parameters:
        config - Config node containing the OCI metrics settings
        Returns:
        updated builder
      • monitoringClient

        public OciMetricsSupport.Builder monitoringClient​(Monitoring monitoringClient)
        Sets the Monitoring client instance to use in sending metrics to OCI.
        Parameters:
        monitoringClient - the MonitoringClient instance
        Returns:
        updated builder
      • enabled

        public boolean enabled()
        Returns boolean value to indicate whether OciMetricsSupport service will be activated or not.
        Returns:
        true if OciMetricsSupport service will be activated or false if it not