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 intPERF_LOG_THRESHOLD
-
Constructor Summary
Constructors Constructor Description ThrottlingStatsCollectorImpl(StatisticsProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoneCreate(long throttlingTimeNanos, Collection<? extends Document> collection, List<String> ids, boolean insertSuccess)Called when a document is created in the given collectionvoiddoneCreateOrUpdate(long throttlingTimeNanos, Collection<? extends Document> collection, List<String> ids)Called when multiple document are either created or updated.voiddoneFindAndModify(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.voiddoneFindAndModify(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.voiddoneRemove(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:ThrottlingStatsCollectorCalled when a document is created in the given collection- Specified by:
doneCreatein 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:ThrottlingStatsCollectorCalled when multiple document are either created or updated.- Specified by:
doneCreateOrUpdatein 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:ThrottlingStatsCollectorCalled when a update operation was completed which affected single document.- Specified by:
doneFindAndModifyin 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:ThrottlingStatsCollectorCalled when a update operation was completed which could have affected multiple documents.- Specified by:
doneFindAndModifyin 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:ThrottlingStatsCollectorCalled when a remove operation for documents was completed.- Specified by:
doneRemovein interfaceThrottlingStatsCollector- Parameters:
throttlingTimeNanos- time takencollection- the collection
-
-