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
FieldsFields inherited from interface org.apache.jackrabbit.oak.plugins.document.DocumentStoreStatsMBean
TYPE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doneCreate
(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids, boolean insertSuccess) Called when a document is created in the given collectionvoid
doneCreateOrUpdate
(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids) Called when multiple document are either created or updated.void
doneFindAndModify
(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.void
doneFindAndModify
(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.void
doneFindCached
(Collection<? extends Document> collection, String key) Called when a document with given key is found from the cachevoid
doneFindUncached
(long timeTakenNanos, Collection<? extends Document> collection, String key, boolean docFound, boolean isSlaveOk) Called when a document with given key is read from remote storevoid
donePrefetch
(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids) Called when a prefetch operation for documents was completed.void
doneQuery
(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 performedvoid
doneRemove
(long timeTakenNanos, Collection<? extends Document> collection, int removeCount) Called when a remove operation for documents was completed.long
long
long
long
long
long
long
long
long
long
-
Field Details
-
PERF_LOG_THRESHOLD
public static final int PERF_LOG_THRESHOLD- See Also:
-
-
Constructor Details
-
DocumentStoreStats
-
-
Method Details
-
doneFindCached
Description copied from interface:DocumentStoreStatsCollector
Called when a document with given key is found from the cache- Specified by:
doneFindCached
in 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:DocumentStoreStatsCollector
Called when a document with given key is read from remote store- Specified by:
doneFindUncached
in 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:DocumentStoreStatsCollector
Called when query with given parameters is performed- Specified by:
doneQuery
in 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 (-1
if 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:DocumentStoreStatsCollector
Called when a document is created in the given collection- Specified by:
doneCreate
in 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:DocumentStoreStatsCollector
Called when multiple document are either created or updated.- Specified by:
doneCreateOrUpdate
in 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:DocumentStoreStatsCollector
Called when a update operation was completed which affected single document.- Specified by:
doneFindAndModify
in 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:DocumentStoreStatsCollector
Called when a update operation was completed which could have affected multiple documents.- Specified by:
doneFindAndModify
in 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:DocumentStoreStatsCollector
Called when a remove operation for documents was completed.- Specified by:
doneRemove
in 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:DocumentStoreStatsCollector
Called when a prefetch operation for documents was completed.- Specified by:
donePrefetch
in interfaceDocumentStoreStatsCollector
- Parameters:
timeTakenNanos
- time takencollection
- the collectionids
- list of IDs to prefetch / read
-
getNodesFindCount
public long getNodesFindCount()- Specified by:
getNodesFindCount
in interfaceDocumentStoreStatsMBean
-
getNodesFindQueryCount
public long getNodesFindQueryCount()- Specified by:
getNodesFindQueryCount
in interfaceDocumentStoreStatsMBean
-
getNodesFindMissingCount
public long getNodesFindMissingCount()- Specified by:
getNodesFindMissingCount
in interfaceDocumentStoreStatsMBean
-
getNodesReadByQueryCount
public long getNodesReadByQueryCount()- Specified by:
getNodesReadByQueryCount
in interfaceDocumentStoreStatsMBean
-
getNodesCreateCount
public long getNodesCreateCount()- Specified by:
getNodesCreateCount
in interfaceDocumentStoreStatsMBean
-
getNodesUpdateCount
public long getNodesUpdateCount()- Specified by:
getNodesUpdateCount
in interfaceDocumentStoreStatsMBean
-
getNodesRemoveCount
public long getNodesRemoveCount()- Specified by:
getNodesRemoveCount
in interfaceDocumentStoreStatsMBean
-
getJournalCreateCount
public long getJournalCreateCount()- Specified by:
getJournalCreateCount
in interfaceDocumentStoreStatsMBean
-
getJournalReadCount
public long getJournalReadCount()- Specified by:
getJournalReadCount
in interfaceDocumentStoreStatsMBean
-
getNodesPrefetchCount
public long getNodesPrefetchCount()- Specified by:
getNodesPrefetchCount
in interfaceDocumentStoreStatsMBean
-
getFindCachedNodesHistory
- Specified by:
getFindCachedNodesHistory
in interfaceDocumentStoreStatsMBean
-
getFindSplitNodesHistory
- Specified by:
getFindSplitNodesHistory
in interfaceDocumentStoreStatsMBean
-
getFindNodesFromPrimaryHistory
- Specified by:
getFindNodesFromPrimaryHistory
in interfaceDocumentStoreStatsMBean
-
getFindNodesFromSlaveHistory
- Specified by:
getFindNodesFromSlaveHistory
in interfaceDocumentStoreStatsMBean
-
getFindNodesMissingHistory
- Specified by:
getFindNodesMissingHistory
in interfaceDocumentStoreStatsMBean
-
getQueryNodesFromSlaveHistory
- Specified by:
getQueryNodesFromSlaveHistory
in interfaceDocumentStoreStatsMBean
-
getQueryNodesFromPrimaryHistory
- Specified by:
getQueryNodesFromPrimaryHistory
in interfaceDocumentStoreStatsMBean
-
getQueryNodesLockHistory
- Specified by:
getQueryNodesLockHistory
in interfaceDocumentStoreStatsMBean
-
getQueryJournalHistory
- Specified by:
getQueryJournalHistory
in interfaceDocumentStoreStatsMBean
-
getCreateJournalHistory
- Specified by:
getCreateJournalHistory
in interfaceDocumentStoreStatsMBean
-
getCreateNodesHistory
- Specified by:
getCreateNodesHistory
in interfaceDocumentStoreStatsMBean
-
getUpdateNodesHistory
- Specified by:
getUpdateNodesHistory
in interfaceDocumentStoreStatsMBean
-
getUpdateNodesRetryHistory
- Specified by:
getUpdateNodesRetryHistory
in interfaceDocumentStoreStatsMBean
-
getUpdateNodesFailureHistory
- Specified by:
getUpdateNodesFailureHistory
in interfaceDocumentStoreStatsMBean
-
getRemoveNodesHistory
- Specified by:
getRemoveNodesHistory
in interfaceDocumentStoreStatsMBean
-
getPrefetchNodesHistory
- Specified by:
getPrefetchNodesHistory
in interfaceDocumentStoreStatsMBean
-