Package com.apple.foundationdb.clientlog
Class DatabaseClientLogEventCounter
java.lang.Object
com.apple.foundationdb.clientlog.DatabaseClientLogEventCounter
- All Implemented Interfaces:
DatabaseClientLogEvents.EventConsumer
@API(EXPERIMENTAL)
public class DatabaseClientLogEventCounter
extends Object
implements DatabaseClientLogEvents.EventConsumer
Count tuple-encoded keys into
TupleKeyCountTree
.-
Constructor Summary
ConstructorsConstructorDescriptionDatabaseClientLogEventCounter
(TupleKeyCountTree root, boolean countReads, boolean countWrites, boolean countSingleKeys, boolean countRanges, boolean byAddress) -
Method Summary
Modifier and TypeMethodDescriptionaccept
(Transaction tr, FDBClientLogEvents.Event event) Update the count tree with keys — and optional storage server IP addresses — in an event.protected CompletableFuture<Void>
addCommit
(Transaction tr, FDBClientLogEvents.CommitRequest commitRequest) protected CompletableFuture<Void>
addKey
(Transaction tr, byte[] key) protected CompletableFuture<Void>
addKeyAddresses
(Transaction tr, byte[] key) protected CompletableFuture<Void>
addRange
(Transaction tr, Range range)
-
Constructor Details
-
DatabaseClientLogEventCounter
public DatabaseClientLogEventCounter(@Nonnull TupleKeyCountTree root, boolean countReads, boolean countWrites, boolean countSingleKeys, boolean countRanges, boolean byAddress)
-
-
Method Details
-
accept
public CompletableFuture<Void> accept(@Nonnull Transaction tr, @Nonnull FDBClientLogEvents.Event event) Update the count tree with keys — and optional storage server IP addresses — in an event.- Specified by:
accept
in interfaceDatabaseClientLogEvents.EventConsumer
- Parameters:
tr
- an open record contextevent
- a parsed client latency event- Returns:
- a future that completes when the event has been processed
-
addKey
-
addKeyAddresses
-
addRange
-
addCommit
protected CompletableFuture<Void> addCommit(@Nonnull Transaction tr, @Nonnull FDBClientLogEvents.CommitRequest commitRequest)
-