Record Class MetricsBackendContext
java.lang.Object
java.lang.Record
com.monkey.ultimatebot.common.metrics.MetricsBackendContext
public record MetricsBackendContext(boolean prometheusEndpointEnabled, String pluginVersion, String minecraftVersion, IntSupplier activeBots, LongSupplier targetCacheSize, LongSupplier targetCacheHits, LongSupplier targetCacheMisses, LongSupplier targetCacheEvictions)
extends Record
Immutable Java-only runtime values exposed to an optional metrics backend.
-
Constructor Summary
ConstructorsConstructorDescriptionMetricsBackendContext(boolean prometheusEndpointEnabled, String pluginVersion, String minecraftVersion, IntSupplier activeBots, LongSupplier targetCacheSize, LongSupplier targetCacheHits, LongSupplier targetCacheMisses, LongSupplier targetCacheEvictions) Creates an instance of aMetricsBackendContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactiveBotsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theminecraftVersionrecord component.Returns the value of thepluginVersionrecord component.booleanReturns the value of theprometheusEndpointEnabledrecord component.Returns the value of thetargetCacheEvictionsrecord component.Returns the value of thetargetCacheHitsrecord component.Returns the value of thetargetCacheMissesrecord component.Returns the value of thetargetCacheSizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MetricsBackendContext
public MetricsBackendContext(boolean prometheusEndpointEnabled, String pluginVersion, String minecraftVersion, IntSupplier activeBots, LongSupplier targetCacheSize, LongSupplier targetCacheHits, LongSupplier targetCacheMisses, LongSupplier targetCacheEvictions) Creates an instance of aMetricsBackendContextrecord class.- Parameters:
prometheusEndpointEnabled- the value for theprometheusEndpointEnabledrecord componentpluginVersion- the value for thepluginVersionrecord componentminecraftVersion- the value for theminecraftVersionrecord componentactiveBots- the value for theactiveBotsrecord componenttargetCacheSize- the value for thetargetCacheSizerecord componenttargetCacheHits- the value for thetargetCacheHitsrecord componenttargetCacheMisses- the value for thetargetCacheMissesrecord componenttargetCacheEvictions- the value for thetargetCacheEvictionsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
prometheusEndpointEnabled
public boolean prometheusEndpointEnabled()Returns the value of theprometheusEndpointEnabledrecord component.- Returns:
- the value of the
prometheusEndpointEnabledrecord component
-
pluginVersion
Returns the value of thepluginVersionrecord component.- Returns:
- the value of the
pluginVersionrecord component
-
minecraftVersion
Returns the value of theminecraftVersionrecord component.- Returns:
- the value of the
minecraftVersionrecord component
-
activeBots
Returns the value of theactiveBotsrecord component.- Returns:
- the value of the
activeBotsrecord component
-
targetCacheSize
Returns the value of thetargetCacheSizerecord component.- Returns:
- the value of the
targetCacheSizerecord component
-
targetCacheHits
Returns the value of thetargetCacheHitsrecord component.- Returns:
- the value of the
targetCacheHitsrecord component
-
targetCacheMisses
Returns the value of thetargetCacheMissesrecord component.- Returns:
- the value of the
targetCacheMissesrecord component
-
targetCacheEvictions
Returns the value of thetargetCacheEvictionsrecord component.- Returns:
- the value of the
targetCacheEvictionsrecord component
-