Interface ThrottlingStatsCollector
-
- All Known Implementing Classes:
ThrottlingStatsCollectorImpl
public interface ThrottlingStatsCollector
Stats Collector for throttling operation.It's implementation are required to provide the time taken for implementing each operation while throttling is ON.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
doneCreate(long throttlingTimeNanos, Collection<? extends Document> collection, List<String> ids, boolean insertSuccess)
Called when a document is created in the given collectionvoid
doneCreateOrUpdate(long throttlingTimeNanos, Collection<? extends Document> collection, List<String> ids)
Called when multiple document are either created or updated.void
doneFindAndModify(long throttlingTimeNanos, Collection<? extends Document> collection, String key, boolean newEntry, boolean success, int retryCount)
Called when a update operation was completed which affected single document.void
doneFindAndModify(long throttlingTimeNanos, Collection<? extends Document> collection, List<String> ids, boolean success, int retryCount)
Called when a update operation was completed which could have affected multiple documents.void
doneRemove(long throttlingTimeNanos, Collection<? extends Document> collection)
Called when a remove operation for documents was completed.
-
-
-
Method Detail
-
doneCreate
void doneCreate(long throttlingTimeNanos, Collection<? extends Document> collection, List<String> ids, boolean insertSuccess)
Called when a document is created in the given collection- Parameters:
throttlingTimeNanos
- time takencollection
- the collectionids
- list of ids request to be createdinsertSuccess
- true if the insert was successful
-
doneCreateOrUpdate
void doneCreateOrUpdate(long throttlingTimeNanos, Collection<? extends Document> collection, List<String> ids)
Called when multiple document are either created or updated.- Parameters:
throttlingTimeNanos
- time takencollection
- the collectionids
- list of ids request to be created or updated
-
doneFindAndModify
void doneFindAndModify(long throttlingTimeNanos, Collection<? extends Document> collection, String key, boolean newEntry, boolean success, int retryCount)
Called when a update operation was completed which affected single document.- Parameters:
throttlingTimeNanos
- time takencollection
- the collectionkey
- collection which got updated or insertednewEntry
- true if the document was newly created due to given operationsuccess
- true if the update was successretryCount
- number of retries done to get the update
-
doneFindAndModify
void doneFindAndModify(long throttlingTimeNanos, Collection<? extends Document> collection, List<String> ids, boolean success, int retryCount)
Called when a update operation was completed which could have affected multiple documents.- Parameters:
throttlingTimeNanos
- time takencollection
- the collectionids
- List of document ids which got updatedsuccess
- true if the update was successretryCount
- number of retries done to get the update
-
doneRemove
void doneRemove(long throttlingTimeNanos, Collection<? extends Document> collection)
Called when a remove operation for documents was completed.- Parameters:
throttlingTimeNanos
- time takencollection
- the collection
-
-