Enum FDBStoreTimer.CountAggregates
- java.lang.Object
-
- java.lang.Enum<FDBStoreTimer.CountAggregates>
-
- com.apple.foundationdb.record.provider.foundationdb.FDBStoreTimer.CountAggregates
-
- All Implemented Interfaces:
StoreTimer.Aggregate
,StoreTimer.Count
,StoreTimer.Event
,Serializable
,Comparable<FDBStoreTimer.CountAggregates>
- Enclosing class:
- FDBStoreTimer
public static enum FDBStoreTimer.CountAggregates extends Enum<FDBStoreTimer.CountAggregates> implements StoreTimer.Aggregate, StoreTimer.Count
An aggregate over other count events.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BYTES_DELETED
The number of bytes deleted.
-
Field Summary
-
Fields inherited from interface com.apple.foundationdb.record.provider.common.StoreTimer.Event
LOG_KEY_SUFFIX_CACHE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StoreTimer.Counter
compute(StoreTimer storeTimer)
Compute the value for this aggregate.Set<StoreTimer.Count>
getComponentEvents()
Returns the set of events that make up the aggregate.boolean
isSize()
Get whether the count value is actually a size in bytes.String
logKey()
Get the key of this event for logging.String
title()
Get the title of this event for user displays.static FDBStoreTimer.CountAggregates
valueOf(String name)
Returns the enum constant of this type with the specified name.static FDBStoreTimer.CountAggregates[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.apple.foundationdb.record.provider.common.StoreTimer.Aggregate
compute, compute, validate, validate
-
Methods inherited from interface com.apple.foundationdb.record.provider.common.StoreTimer.Event
logKeyWithSuffix, name
-
-
-
-
Enum Constant Detail
-
BYTES_DELETED
public static final FDBStoreTimer.CountAggregates BYTES_DELETED
The number of bytes deleted. This represents the number of bytes cleared by all events instrumented by anFDBStoreTimer
. Note that it is not possible (for efficiency reasons) to track all deleted bytes, specifically for manyclear()
operations. A range clear takes a start and end key and efficiently deletes all bytes in between at the server and, thus, the client has no visibility into the number of bytes actually deleted by the operation.
-
-
Method Detail
-
values
public static FDBStoreTimer.CountAggregates[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FDBStoreTimer.CountAggregates c : FDBStoreTimer.CountAggregates.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FDBStoreTimer.CountAggregates valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
title
@Nonnull public String title()
Description copied from interface:StoreTimer.Event
Get the title of this event for user displays.- Specified by:
title
in interfaceStoreTimer.Event
- Returns:
- the user-visible title
-
logKey
@Nonnull public String logKey()
Description copied from interface:StoreTimer.Event
Get the key of this event for logging. This should be used withKeyValueLogMessage
s and other key-value based logging systems to log the values from instrumented events. These keys are not expected to change frequently. They may, however, change outside of any minor version change. Their values, therefore, should not be relied upon, other than for the logging purposes.- Specified by:
logKey
in interfaceStoreTimer.Event
- Returns:
- the key to use for logging
-
getComponentEvents
public Set<StoreTimer.Count> getComponentEvents()
Description copied from interface:StoreTimer.Aggregate
Returns the set of events that make up the aggregate. Note that theoretically an aggregate could be defined in a manner such that some events contributed to the aggregate in different fashions (for example,eventA + eventB - eventC
), in which case this method would return the fact that the three events comprise the aggregate but with no indication of in which manner they contribute to its value.- Specified by:
getComponentEvents
in interfaceStoreTimer.Aggregate
- Returns:
- the events that comprise the aggregate
-
compute
@Nullable public StoreTimer.Counter compute(@Nonnull StoreTimer storeTimer)
Description copied from interface:StoreTimer.Aggregate
Compute the value for this aggregate.- Specified by:
compute
in interfaceStoreTimer.Aggregate
- Parameters:
storeTimer
- the time from which to draw the values that are necessary to compute this aggregate- Returns:
- the computed result or null if none of the value that comprise this aggregate were available
-
isSize
public boolean isSize()
Description copied from interface:StoreTimer.Count
Get whether the count value is actually a size in bytes.- Specified by:
isSize
in interfaceStoreTimer.Count
- Returns:
true
if the count value is actually a size in bytes
-
-