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 Summary
Modifier and TypeMethodDescriptionbatchDelay
(long value) Sets the delay interval if metrics are posted in batches (defaults to 1L).batchSize
(int value) Sets the maximum no.build()
Build the instance from this builder.compartmentId
(String value) Sets the compartment ID.Updates the builder using the specified OCI metricsConfig
node.delay
(long value) Sets the delay interval between metric posting (defaults to 60L).descriptionEnabled
(boolean value) Sets whether the description should be enabled or not.boolean
enabled()
Returns boolean value to indicate whether OciMetricsSupport service will be activated or not.enabled
(boolean value) Sets whether metrics transmission to OCI is enabled.initialDelay
(long value) Sets the initial delay before metrics are sent to OCI (defaults to 1L).monitoringClient
(com.oracle.bmc.monitoring.Monitoring monitoringClient) Sets theMonitoring
client instance to use in sending metrics to OCI.nameFormatter
(OciMetricsSupport.NameFormatter nameFormatter) Sets theOciMetricsSupport.NameFormatter
to use in formatting metric names.Sets the namespace.resourceGroup
(String value) Sets the resource group.schedulingTimeUnit
(TimeUnit timeUnit) Sets the time unit applied to the initial delay and delay values (defaults toTimeUnit.SECONDS
).Sets which metrics scopes (e.g., base, vendor, application) should be sent to OCI.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<OciMetricsSupport.Builder,
OciMetricsSupport> - Returns:
- instance of the built type
-
initialDelay
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
Sets the delay interval between metric posting (defaults to 60L).- Parameters:
value
- delay, expressed in time units set byschedulingTimeUnit(TimeUnit)
- Returns:
- updated builder
-
batchDelay
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
Sets the time unit applied to the initial delay and delay values (defaults toTimeUnit.SECONDS
).- Parameters:
timeUnit
- unit of time- Returns:
- updated builder
-
compartmentId
Sets the compartment ID.- Parameters:
value
- compartment ID- Returns:
- updated builder
-
namespace
Sets the namespace.- Parameters:
value
- namespace- Returns:
- updated builder
-
nameFormatter
Sets theOciMetricsSupport.NameFormatter
to use in formatting metric names. See theOciMetricsSupport.NameFormatter.format(Meter, Meter.Id, String, String)
method for details about the default formatting.- Parameters:
nameFormatter
- the formatter to use- Returns:
- updated builder
-
resourceGroup
Sets the resource group.- Parameters:
value
- resource group- Returns:
- updated builder
-
descriptionEnabled
Sets whether the description should be enabled or not.Defaults to
true
.- Parameters:
value
- enabled- Returns:
- updated builder
-
scopes
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
Sets whether metrics transmission to OCI is enabled.Defaults to
true
.- Parameters:
value
- whether metrics transmission should be enabled- Returns:
- updated builder
-
batchSize
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
Updates the builder using the specified OCI metricsConfig
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 theMonitoring
client instance to use in sending metrics to OCI.- Parameters:
monitoringClient
- theMonitoringClient
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 orfalse
if it not
-