Class DocumentStoreStats
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.DocumentStoreStats
-
- All Implemented Interfaces:
DocumentStoreStatsCollector,DocumentStoreStatsMBean
public class DocumentStoreStats extends Object implements DocumentStoreStatsCollector, DocumentStoreStatsMBean
Document Store statistics helper class.
-
-
Field Summary
Fields Modifier and Type Field Description static intPERF_LOG_THRESHOLD-
Fields inherited from interface org.apache.jackrabbit.oak.plugins.document.DocumentStoreStatsMBean
TYPE
-
-
Constructor Summary
Constructors Constructor Description DocumentStoreStats(StatisticsProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoneCreate(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids, boolean insertSuccess)Called when a document is created in the given collectionvoiddoneCreateOrUpdate(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids)Called when multiple document are either created or updated.voiddoneFindAndModify(long timeTakenNanos, 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 timeTakenNanos, Collection<? extends Document> collection, List<String> ids, boolean success, int retryCount)Called when a update operation was completed which could have affected multiple documents.voiddoneFindCached(Collection<? extends Document> collection, String key)Called when a document with given key is found from the cachevoiddoneFindUncached(long timeTakenNanos, Collection<? extends Document> collection, String key, boolean docFound, boolean isSlaveOk)Called when a document with given key is read from remote storevoiddonePrefetch(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids)Called when a prefetch operation for documents was completed.voiddoneQuery(long timeTakenNanos, Collection<? extends Document> collection, String fromKey, String toKey, boolean indexedProperty, int resultSize, long lockTime, boolean isSlaveOk)Called when query with given parameters is performedvoiddoneRemove(long timeTakenNanos, Collection<? extends Document> collection, int removeCount)Called when a remove operation for documents was completed.CompositeDatagetCreateJournalHistory()CompositeDatagetCreateNodesHistory()CompositeDatagetFindCachedNodesHistory()CompositeDatagetFindNodesFromPrimaryHistory()CompositeDatagetFindNodesFromSlaveHistory()CompositeDatagetFindNodesMissingHistory()CompositeDatagetFindSplitNodesHistory()longgetJournalCreateCount()longgetJournalReadCount()longgetNodesCreateCount()longgetNodesFindCount()longgetNodesFindMissingCount()longgetNodesFindQueryCount()longgetNodesPrefetchCount()longgetNodesReadByQueryCount()longgetNodesRemoveCount()longgetNodesUpdateCount()CompositeDatagetPrefetchNodesHistory()CompositeDatagetQueryJournalHistory()CompositeDatagetQueryNodesFromPrimaryHistory()CompositeDatagetQueryNodesFromSlaveHistory()CompositeDatagetQueryNodesLockHistory()CompositeDatagetRemoveNodesHistory()CompositeDatagetUpdateNodesFailureHistory()CompositeDatagetUpdateNodesHistory()CompositeDatagetUpdateNodesRetryHistory()
-
-
-
Field Detail
-
PERF_LOG_THRESHOLD
public static final int PERF_LOG_THRESHOLD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DocumentStoreStats
public DocumentStoreStats(StatisticsProvider provider)
-
-
Method Detail
-
doneFindCached
public void doneFindCached(Collection<? extends Document> collection, String key)
Description copied from interface:DocumentStoreStatsCollectorCalled when a document with given key is found from the cache- Specified by:
doneFindCachedin interfaceDocumentStoreStatsCollector- Parameters:
collection- the collectionkey- collection key which is found
-
doneFindUncached
public void doneFindUncached(long timeTakenNanos, Collection<? extends Document> collection, String key, boolean docFound, boolean isSlaveOk)Description copied from interface:DocumentStoreStatsCollectorCalled when a document with given key is read from remote store- Specified by:
doneFindUncachedin interfaceDocumentStoreStatsCollector- Parameters:
timeTakenNanos- time takencollection- the collectionkey- collection keydocFound- true if document is foundisSlaveOk- true if find was performed against a secondary instance
-
doneQuery
public void doneQuery(long timeTakenNanos, Collection<? extends Document> collection, String fromKey, String toKey, boolean indexedProperty, int resultSize, long lockTime, boolean isSlaveOk)Description copied from interface:DocumentStoreStatsCollectorCalled when query with given parameters is performed- Specified by:
doneQueryin interfaceDocumentStoreStatsCollector- Parameters:
timeTakenNanos- time takencollection- the collectionfromKey- the start value (excluding)toKey- the end value (excluding)indexedProperty- true if indexedProperty was specifiedresultSize- number of documents found for given querylockTime- time in millis to acquire any lock (-1if no lock was required)isSlaveOk- true if find was performed against a secondary instance
-
doneCreate
public void doneCreate(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids, boolean insertSuccess)Description copied from interface:DocumentStoreStatsCollectorCalled when a document is created in the given collection- Specified by:
doneCreatein interfaceDocumentStoreStatsCollector- Parameters:
timeTakenNanos- time takencollection- the collectionids- list of ids request to be createdinsertSuccess- true if the insert was successful
-
doneCreateOrUpdate
public void doneCreateOrUpdate(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids)Description copied from interface:DocumentStoreStatsCollectorCalled when multiple document are either created or updated.- Specified by:
doneCreateOrUpdatein interfaceDocumentStoreStatsCollector- Parameters:
timeTakenNanos- time takencollection- the collectionids- list of ids request to be created or updated
-
doneFindAndModify
public void doneFindAndModify(long timeTakenNanos, Collection<? extends Document> collection, String key, boolean newEntry, boolean success, int retryCount)Description copied from interface:DocumentStoreStatsCollectorCalled when a update operation was completed which affected single document.- Specified by:
doneFindAndModifyin interfaceDocumentStoreStatsCollector- Parameters:
timeTakenNanos- 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 timeTakenNanos, Collection<? extends Document> collection, List<String> ids, boolean success, int retryCount)Description copied from interface:DocumentStoreStatsCollectorCalled when a update operation was completed which could have affected multiple documents.- Specified by:
doneFindAndModifyin interfaceDocumentStoreStatsCollector- Parameters:
timeTakenNanos- 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 timeTakenNanos, Collection<? extends Document> collection, int removeCount)Description copied from interface:DocumentStoreStatsCollectorCalled when a remove operation for documents was completed.- Specified by:
doneRemovein interfaceDocumentStoreStatsCollector- Parameters:
timeTakenNanos- time takencollection- the collectionremoveCount- the number of removed documents
-
donePrefetch
public void donePrefetch(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids)Description copied from interface:DocumentStoreStatsCollectorCalled when a prefetch operation for documents was completed.- Specified by:
donePrefetchin interfaceDocumentStoreStatsCollector- Parameters:
timeTakenNanos- time takencollection- the collectionids- list of IDs to prefetch / read
-
getNodesFindCount
public long getNodesFindCount()
- Specified by:
getNodesFindCountin interfaceDocumentStoreStatsMBean
-
getNodesFindQueryCount
public long getNodesFindQueryCount()
- Specified by:
getNodesFindQueryCountin interfaceDocumentStoreStatsMBean
-
getNodesFindMissingCount
public long getNodesFindMissingCount()
- Specified by:
getNodesFindMissingCountin interfaceDocumentStoreStatsMBean
-
getNodesReadByQueryCount
public long getNodesReadByQueryCount()
- Specified by:
getNodesReadByQueryCountin interfaceDocumentStoreStatsMBean
-
getNodesCreateCount
public long getNodesCreateCount()
- Specified by:
getNodesCreateCountin interfaceDocumentStoreStatsMBean
-
getNodesUpdateCount
public long getNodesUpdateCount()
- Specified by:
getNodesUpdateCountin interfaceDocumentStoreStatsMBean
-
getNodesRemoveCount
public long getNodesRemoveCount()
- Specified by:
getNodesRemoveCountin interfaceDocumentStoreStatsMBean
-
getJournalCreateCount
public long getJournalCreateCount()
- Specified by:
getJournalCreateCountin interfaceDocumentStoreStatsMBean
-
getJournalReadCount
public long getJournalReadCount()
- Specified by:
getJournalReadCountin interfaceDocumentStoreStatsMBean
-
getNodesPrefetchCount
public long getNodesPrefetchCount()
- Specified by:
getNodesPrefetchCountin interfaceDocumentStoreStatsMBean
-
getFindCachedNodesHistory
public CompositeData getFindCachedNodesHistory()
- Specified by:
getFindCachedNodesHistoryin interfaceDocumentStoreStatsMBean
-
getFindSplitNodesHistory
public CompositeData getFindSplitNodesHistory()
- Specified by:
getFindSplitNodesHistoryin interfaceDocumentStoreStatsMBean
-
getFindNodesFromPrimaryHistory
public CompositeData getFindNodesFromPrimaryHistory()
- Specified by:
getFindNodesFromPrimaryHistoryin interfaceDocumentStoreStatsMBean
-
getFindNodesFromSlaveHistory
public CompositeData getFindNodesFromSlaveHistory()
- Specified by:
getFindNodesFromSlaveHistoryin interfaceDocumentStoreStatsMBean
-
getFindNodesMissingHistory
public CompositeData getFindNodesMissingHistory()
- Specified by:
getFindNodesMissingHistoryin interfaceDocumentStoreStatsMBean
-
getQueryNodesFromSlaveHistory
public CompositeData getQueryNodesFromSlaveHistory()
- Specified by:
getQueryNodesFromSlaveHistoryin interfaceDocumentStoreStatsMBean
-
getQueryNodesFromPrimaryHistory
public CompositeData getQueryNodesFromPrimaryHistory()
- Specified by:
getQueryNodesFromPrimaryHistoryin interfaceDocumentStoreStatsMBean
-
getQueryNodesLockHistory
public CompositeData getQueryNodesLockHistory()
- Specified by:
getQueryNodesLockHistoryin interfaceDocumentStoreStatsMBean
-
getQueryJournalHistory
public CompositeData getQueryJournalHistory()
- Specified by:
getQueryJournalHistoryin interfaceDocumentStoreStatsMBean
-
getCreateJournalHistory
public CompositeData getCreateJournalHistory()
- Specified by:
getCreateJournalHistoryin interfaceDocumentStoreStatsMBean
-
getCreateNodesHistory
public CompositeData getCreateNodesHistory()
- Specified by:
getCreateNodesHistoryin interfaceDocumentStoreStatsMBean
-
getUpdateNodesHistory
public CompositeData getUpdateNodesHistory()
- Specified by:
getUpdateNodesHistoryin interfaceDocumentStoreStatsMBean
-
getUpdateNodesRetryHistory
public CompositeData getUpdateNodesRetryHistory()
- Specified by:
getUpdateNodesRetryHistoryin interfaceDocumentStoreStatsMBean
-
getUpdateNodesFailureHistory
public CompositeData getUpdateNodesFailureHistory()
- Specified by:
getUpdateNodesFailureHistoryin interfaceDocumentStoreStatsMBean
-
getRemoveNodesHistory
public CompositeData getRemoveNodesHistory()
- Specified by:
getRemoveNodesHistoryin interfaceDocumentStoreStatsMBean
-
getPrefetchNodesHistory
public CompositeData getPrefetchNodesHistory()
- Specified by:
getPrefetchNodesHistoryin interfaceDocumentStoreStatsMBean
-
-