Class ThrottlingStatsCollectorImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.ThrottlingStatsCollectorImpl
-
- All Implemented Interfaces:
ThrottlingStatsCollector
public class ThrottlingStatsCollectorImpl extends Object implements ThrottlingStatsCollector
Throttling statistics helper class.
-
-
Field Summary
Fields Modifier and Type Field Description static int
PERF_LOG_THRESHOLD
-
Constructor Summary
Constructors Constructor Description ThrottlingStatsCollectorImpl(StatisticsProvider provider)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
PERF_LOG_THRESHOLD
public static final int PERF_LOG_THRESHOLD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ThrottlingStatsCollectorImpl
public ThrottlingStatsCollectorImpl(StatisticsProvider provider)
-
-
Method Detail
-
doneCreate
public void doneCreate(long throttlingTimeNanos, Collection<? extends Document> collection, List<String> ids, boolean insertSuccess)
Description copied from interface:ThrottlingStatsCollector
Called when a document is created in the given collection- Specified by:
doneCreate
in interfaceThrottlingStatsCollector
- Parameters:
throttlingTimeNanos
- time takencollection
- the collectionids
- list of ids request to be createdinsertSuccess
- true if the insert was successful
-
doneCreateOrUpdate
public void doneCreateOrUpdate(long throttlingTimeNanos, Collection<? extends Document> collection, List<String> ids)
Description copied from interface:ThrottlingStatsCollector
Called when multiple document are either created or updated.- Specified by:
doneCreateOrUpdate
in interfaceThrottlingStatsCollector
- Parameters:
throttlingTimeNanos
- time takencollection
- the collectionids
- list of ids request to be created or updated
-
doneFindAndModify
public void doneFindAndModify(long throttlingTimeNanos, Collection<? extends Document> collection, String key, boolean newEntry, boolean success, int retryCount)
Description copied from interface:ThrottlingStatsCollector
Called when a update operation was completed which affected single document.- Specified by:
doneFindAndModify
in interfaceThrottlingStatsCollector
- 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
public void doneFindAndModify(long throttlingTimeNanos, Collection<? extends Document> collection, List<String> ids, boolean success, int retryCount)
Description copied from interface:ThrottlingStatsCollector
Called when a update operation was completed which could have affected multiple documents.- Specified by:
doneFindAndModify
in interfaceThrottlingStatsCollector
- 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
public void doneRemove(long throttlingTimeNanos, Collection<? extends Document> collection)
Description copied from interface:ThrottlingStatsCollector
Called when a remove operation for documents was completed.- Specified by:
doneRemove
in interfaceThrottlingStatsCollector
- Parameters:
throttlingTimeNanos
- time takencollection
- the collection
-
-