public class NoopMetricsListener extends Object implements MetricsListener
NoopMetricsListener that does nothing on the callbacks.| Modifier and Type | Field and Description |
|---|---|
static NoopMetricsListener |
INSTANCE
A singleton instance of this class.
|
| Constructor and Description |
|---|
NoopMetricsListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
onEntryAdded()
Called when an entry is added to the batch.
|
void |
onFlushFinished(long elapsed,
int successfulEntriesCount,
int failedEntriesCount)
Called when a batch flush is finished.
|
void |
onFlushStarted(long elapsed,
int flushEntriesCount)
Called when a batch flush is not empty and starts the process to persist entries in the database, eventually
after waiting for other flush operations to finish.
|
void |
onFlushTriggered()
Called when a batch flush is triggered.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic static final NoopMetricsListener INSTANCE
public void onEntryAdded()
MetricsListeneronEntryAdded in interface MetricsListenerpublic void onFlushTriggered()
MetricsListenerThe batch may be empty, in which case it will skip the persistence to database.
onFlushTriggered in interface MetricsListenerpublic void onFlushStarted(long elapsed,
int flushEntriesCount)
MetricsListeneronFlushStarted in interface MetricsListenerelapsed - The time elapsed (in milliseconds) since the batch flush was triggered.flushEntriesCount - The number of entries to be flushed.public void onFlushFinished(long elapsed,
int successfulEntriesCount,
int failedEntriesCount)
MetricsListenerThis should be called for all cases:
onFlushFinished in interface MetricsListenerelapsed - The time elapsed (in milliseconds) since the batch flush was triggered.successfulEntriesCount - The number of entries flushed successfully.failedEntriesCount - The number of entries that failed to be flushed.Copyright © 2023 Feedzai. All rights reserved.