Package com.hypixel.hytale.metrics
Class MetricsRegistry<T>
java.lang.Object
com.hypixel.hytale.metrics.MetricsRegistry<T>
- All Implemented Interfaces:
Codec<T>,RawJsonCodec<T>,SchemaConvertable<T>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Function<T, MetricProvider> private static final org.bson.codecs.BsonDocumentCodecprivate static final org.bson.codecs.EncoderContextstatic final org.bson.json.JsonWriterSettingsprivate final StampedLockprivate static final com.hypixel.hytale.logger.HytaleLoggerprivate final Map<String, MetricsRegistry.Metric<T, ?>> Fields inherited from interface com.hypixel.hytale.codec.Codec
BASE64_PATTERN, BOOLEAN, BSON_DOCUMENT, BYTE, BYTE_ARRAY, DOUBLE, DOUBLE_ARRAY, DURATION, DURATION_SECONDS, FLOAT, FLOAT_ARRAY, INSTANT, INT_ARRAY, INTEGER, LOG_LEVEL, LONG, LONG_ARRAY, PATH, SHORT, STRING, STRING_ARRAY, UUID_BINARY, UUID_STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PathcreateDatePath(Path dir, String prefix, String suffix) static PathcreateDumpPath(String ext) static PathcreateDumpPath(String prefix, String ext) static PathcreateDumpPath(Path dir, String ext) org.bson.BsonValuedumpToBson(T t) voiddumpToJson(Path path, T t) dumpToJson(T t) org.bson.BsonValueregister(String id, MetricsRegistry<Void> metricsRegistry) <R extends MetricProvider>
MetricsRegistry<T> <R> MetricsRegistry<T> <R> MetricsRegistry<T> Deprecated.toMetricResults(T t) toSchema(SchemaContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.codec.Codec
decode, decodeJson, encodeMethods inherited from interface com.hypixel.hytale.codec.RawJsonCodec
decodeJsonMethods inherited from interface com.hypixel.hytale.codec.schema.SchemaConvertable
toSchema
-
Field Details
-
LOGGER
private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
JSON_SETTINGS
public static final org.bson.json.JsonWriterSettings JSON_SETTINGS -
ENCODER_CONTEXT
private static final org.bson.codecs.EncoderContext ENCODER_CONTEXT -
BSON_DOCUMENT_CODEC
private static final org.bson.codecs.BsonDocumentCodec BSON_DOCUMENT_CODEC -
appendFunc
-
lock
-
map
-
-
Constructor Details
-
MetricsRegistry
public MetricsRegistry() -
MetricsRegistry
-
-
Method Details
-
register
-
register
-
register
public <R extends MetricProvider> MetricsRegistry<T> register(String id, @Nonnull Function<T, R> func) -
register
@Deprecated public <R> MetricsRegistry<T> register(String id, Function<T, R> func, Function<R, MetricsRegistry<R>> codecFunc) Deprecated. -
decode
-
encode
-
toSchema
- Specified by:
toSchemain interfaceSchemaConvertable<T>
-
toMetricResults
-
dumpToBson
-
dumpToJson
- Throws:
IOException
-
dumpToJson
- Throws:
IOException
-
createDumpPath
- Throws:
IOException
-
createDumpPath
-
createDumpPath
@Nonnull public static Path createDumpPath(@Nullable String prefix, @Nullable String ext) throws IOException - Throws:
IOException
-
createDatePath
-