Class DocumentStoreStats
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.DocumentStoreStats
-
- All Implemented Interfaces:
DocumentStoreStatsCollector,DocumentStoreStatsMBean
public class DocumentStoreStats extends java.lang.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(org.apache.jackrabbit.oak.stats.StatisticsProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoneCreate(long timeTakenNanos, Collection<? extends Document> collection, java.util.List<java.lang.String> ids, boolean insertSuccess)Called when a document is created in the given collectionvoiddoneCreateOrUpdate(long timeTakenNanos, Collection<? extends Document> collection, java.util.List<java.lang.String> ids)Called when multiple document are either created or updated.voiddoneFindAndModify(long timeTakenNanos, Collection<? extends Document> collection, java.lang.String key, boolean newEntry, boolean success, int retryCount)Called when a update operation was completed which affected single document.voiddoneFindCached(Collection<? extends Document> collection, java.lang.String key)Called when a document with given key is found from the cachevoiddoneFindUncached(long timeTakenNanos, Collection<? extends Document> collection, java.lang.String key, boolean docFound, boolean isSlaveOk)Called when a document with given key is read from remote storevoiddoneQuery(long timeTakenNanos, Collection<? extends Document> collection, java.lang.String fromKey, java.lang.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.javax.management.openmbean.CompositeDatagetCreateJournalHistory()javax.management.openmbean.CompositeDatagetCreateNodesHistory()javax.management.openmbean.CompositeDatagetFindCachedNodesHistory()javax.management.openmbean.CompositeDatagetFindNodesFromPrimaryHistory()javax.management.openmbean.CompositeDatagetFindNodesFromSlaveHistory()javax.management.openmbean.CompositeDatagetFindNodesMissingHistory()javax.management.openmbean.CompositeDatagetFindSplitNodesHistory()longgetJournalCreateCount()longgetJournalReadCount()longgetNodesCreateCount()longgetNodesFindCount()longgetNodesFindMissingCount()longgetNodesFindQueryCount()longgetNodesReadByQueryCount()longgetNodesRemoveCount()longgetNodesUpdateCount()javax.management.openmbean.CompositeDatagetQueryJournalHistory()javax.management.openmbean.CompositeDatagetQueryNodesFromPrimaryHistory()javax.management.openmbean.CompositeDatagetQueryNodesFromSlaveHistory()javax.management.openmbean.CompositeDatagetQueryNodesLockHistory()javax.management.openmbean.CompositeDatagetRemoveNodesHistory()javax.management.openmbean.CompositeDatagetUpdateNodesFailureHistory()javax.management.openmbean.CompositeDatagetUpdateNodesHistory()javax.management.openmbean.CompositeDatagetUpdateNodesRetryHistory()
-
-
-
Field Detail
-
PERF_LOG_THRESHOLD
public static final int PERF_LOG_THRESHOLD
- See Also:
- Constant Field Values
-
-
Method Detail
-
doneFindCached
public void doneFindCached(Collection<? extends Document> collection, java.lang.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, java.lang.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, java.lang.String fromKey, java.lang.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, java.util.List<java.lang.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, java.util.List<java.lang.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, java.lang.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
-
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
-
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
-
getFindCachedNodesHistory
public javax.management.openmbean.CompositeData getFindCachedNodesHistory()
- Specified by:
getFindCachedNodesHistoryin interfaceDocumentStoreStatsMBean
-
getFindSplitNodesHistory
public javax.management.openmbean.CompositeData getFindSplitNodesHistory()
- Specified by:
getFindSplitNodesHistoryin interfaceDocumentStoreStatsMBean
-
getFindNodesFromPrimaryHistory
public javax.management.openmbean.CompositeData getFindNodesFromPrimaryHistory()
- Specified by:
getFindNodesFromPrimaryHistoryin interfaceDocumentStoreStatsMBean
-
getFindNodesFromSlaveHistory
public javax.management.openmbean.CompositeData getFindNodesFromSlaveHistory()
- Specified by:
getFindNodesFromSlaveHistoryin interfaceDocumentStoreStatsMBean
-
getFindNodesMissingHistory
public javax.management.openmbean.CompositeData getFindNodesMissingHistory()
- Specified by:
getFindNodesMissingHistoryin interfaceDocumentStoreStatsMBean
-
getQueryNodesFromSlaveHistory
public javax.management.openmbean.CompositeData getQueryNodesFromSlaveHistory()
- Specified by:
getQueryNodesFromSlaveHistoryin interfaceDocumentStoreStatsMBean
-
getQueryNodesFromPrimaryHistory
public javax.management.openmbean.CompositeData getQueryNodesFromPrimaryHistory()
- Specified by:
getQueryNodesFromPrimaryHistoryin interfaceDocumentStoreStatsMBean
-
getQueryNodesLockHistory
public javax.management.openmbean.CompositeData getQueryNodesLockHistory()
- Specified by:
getQueryNodesLockHistoryin interfaceDocumentStoreStatsMBean
-
getQueryJournalHistory
public javax.management.openmbean.CompositeData getQueryJournalHistory()
- Specified by:
getQueryJournalHistoryin interfaceDocumentStoreStatsMBean
-
getCreateJournalHistory
public javax.management.openmbean.CompositeData getCreateJournalHistory()
- Specified by:
getCreateJournalHistoryin interfaceDocumentStoreStatsMBean
-
getCreateNodesHistory
public javax.management.openmbean.CompositeData getCreateNodesHistory()
- Specified by:
getCreateNodesHistoryin interfaceDocumentStoreStatsMBean
-
getUpdateNodesHistory
public javax.management.openmbean.CompositeData getUpdateNodesHistory()
- Specified by:
getUpdateNodesHistoryin interfaceDocumentStoreStatsMBean
-
getUpdateNodesRetryHistory
public javax.management.openmbean.CompositeData getUpdateNodesRetryHistory()
- Specified by:
getUpdateNodesRetryHistoryin interfaceDocumentStoreStatsMBean
-
getUpdateNodesFailureHistory
public javax.management.openmbean.CompositeData getUpdateNodesFailureHistory()
- Specified by:
getUpdateNodesFailureHistoryin interfaceDocumentStoreStatsMBean
-
getRemoveNodesHistory
public javax.management.openmbean.CompositeData getRemoveNodesHistory()
- Specified by:
getRemoveNodesHistoryin interfaceDocumentStoreStatsMBean
-
-