Package com.apple.foundationdb.clientlog
Class FDBClientLogEvents.EventDeserializer
- java.lang.Object
-
- com.apple.foundationdb.clientlog.FDBClientLogEvents.EventDeserializer
-
- All Implemented Interfaces:
FDBClientLogEvents.AsyncConsumer<KeyValue>
- Enclosing class:
- FDBClientLogEvents
protected static class FDBClientLogEvents.EventDeserializer extends Object implements FDBClientLogEvents.AsyncConsumer<KeyValue>
-
-
Constructor Summary
Constructors Constructor Description EventDeserializer(FDBClientLogEvents.AsyncConsumer<FDBClientLogEvents.Event> callback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>
accept(KeyValue keyValue)
Process next key-value pair by calling callback or appending to pending buffer.byte[]
getLastProcessedKey()
Get the last key fully processed.
-
-
-
Constructor Detail
-
EventDeserializer
public EventDeserializer(@Nonnull FDBClientLogEvents.AsyncConsumer<FDBClientLogEvents.Event> callback)
-
-
Method Detail
-
accept
public CompletableFuture<Void> accept(KeyValue keyValue)
Process next key-value pair by calling callback or appending to pending buffer.- Specified by:
accept
in interfaceFDBClientLogEvents.AsyncConsumer<KeyValue>
- Parameters:
keyValue
- a key-value pair with client trace events- Returns:
- a future which completes when the key-value pair has been processed
-
getLastProcessedKey
@Nullable public byte[] getLastProcessedKey()
Get the last key fully processed. This is not the last key passed toaccept(KeyValue)
, since an early part of a split entry is buffered. This is the key from which to resume in a new transaction.- Returns:
- the processed key
-
-