Class OciMetricsSupport.Builder

java.lang.Object
io.helidon.integrations.oci.metrics.OciMetricsSupport.Builder
All Implemented Interfaces:
Builder<OciMetricsSupport.Builder,OciMetricsSupport>, Supplier<OciMetricsSupport>
Enclosing class:
OciMetricsSupport

public static class OciMetricsSupport.Builder extends Object implements Builder<OciMetricsSupport.Builder,OciMetricsSupport>
Fluent API builder to create OciMetricsSupport.
  • Method Details

    • build

      public OciMetricsSupport build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<OciMetricsSupport.Builder,OciMetricsSupport>
      Returns:
      instance of the built type
    • 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
    • delay

      public OciMetricsSupport.Builder delay(long value)
      Sets the delay interval between metric posting (defaults to 60L).
      Parameters:
      value - 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
    • namespace

      public OciMetricsSupport.Builder namespace(String value)
      Sets the namespace.
      Parameters:
      value - namespace
      Returns:
      updated builder
    • nameFormatter

      public OciMetricsSupport.Builder nameFormatter(OciMetricsSupport.NameFormatter nameFormatter)
      Sets the OciMetricsSupport.NameFormatter to use in formatting metric names. See the OciMetricsSupport.NameFormatter.format(Meter, Meter.Id, String, String) method for details about the default formatting.
      Parameters:
      nameFormatter - the formatter to use
      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(com.oracle.bmc.monitoring.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