Class OciMetricsSupport.Builder
- java.lang.Object
-
- io.helidon.integrations.oci.metrics.OciMetricsSupport.Builder
-
- All Implemented Interfaces:
Builder<OciMetricsSupport>,Supplier<OciMetricsSupport>
- Enclosing class:
- OciMetricsSupport
public static class OciMetricsSupport.Builder extends Object implements Builder<OciMetricsSupport>
Fluent API builder to createOciMetricsSupport.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OciMetricsSupport.BuilderbatchDelay(long value)Sets the delay interval if metrics are posted in batches (defaults to 1L).OciMetricsSupport.BuilderbatchSize(int value)Sets the maximum no.OciMetricsSupportbuild()Build the instance from this builder.OciMetricsSupport.BuildercompartmentId(String value)Sets the compartment ID.OciMetricsSupport.Builderconfig(Config config)Updates the builder using the specified OCI metricsConfignode.OciMetricsSupport.Builderdelay(long value)Sets the delay interval between metric posting (defaults to 60L).OciMetricsSupport.BuilderdescriptionEnabled(boolean value)Sets whether the description should be enabled or not.booleanenabled()Returns boolean value to indicate whether OciMetricsSupport service will be activated or not.OciMetricsSupport.Builderenabled(boolean value)Sets whether metrics transmission to OCI is enabled.OciMetricsSupport.BuilderinitialDelay(long value)Sets the initial delay before metrics are sent to OCI (defaults to 1L).OciMetricsSupport.BuildermonitoringClient(Monitoring monitoringClient)Sets theMonitoringclient instance to use in sending metrics to OCI.OciMetricsSupport.BuildernameFormatter(OciMetricsSupport.NameFormatter nameFormatter)Sets theOciMetricsSupport.NameFormatterto use in formatting metric names.OciMetricsSupport.Buildernamespace(String value)Sets the namespace.OciMetricsSupport.BuilderresourceGroup(String value)Sets the resource group.OciMetricsSupport.BuilderschedulingTimeUnit(TimeUnit timeUnit)Sets the time unit applied to the initial delay and delay values (defaults toTimeUnit.SECONDS).OciMetricsSupport.Builderscopes(String[] value)Sets which metrics scopes (e.g., base, vendor, application) should be sent to OCI.
-
-
-
Method Detail
-
build
public OciMetricsSupport build()
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<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 byschedulingTimeUnit(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 byschedulingTimeUnit(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 byschedulingTimeUnit(TimeUnit)- Returns:
- updated builder
-
schedulingTimeUnit
public OciMetricsSupport.Builder schedulingTimeUnit(TimeUnit timeUnit)
Sets the time unit applied to the initial delay and delay values (defaults toTimeUnit.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 theOciMetricsSupport.NameFormatterto use in formatting metric names. See theOciMetricsSupport.NameFormatter.format( MetricID, String, Metadata)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 metricsConfignode.- Parameters:
config-Confignode containing the OCI metrics settings- Returns:
- updated builder
-
monitoringClient
public OciMetricsSupport.Builder monitoringClient(Monitoring monitoringClient)
Sets theMonitoringclient instance to use in sending metrics to OCI.- Parameters:
monitoringClient- theMonitoringClientinstance- Returns:
- updated builder
-
enabled
public boolean enabled()
Returns boolean value to indicate whether OciMetricsSupport service will be activated or not.- Returns:
trueif OciMetricsSupport service will be activated orfalseif it not
-
-