Interface DocumentStoreStatsCollector

All Known Implementing Classes:
DocumentStoreStats

public interface DocumentStoreStatsCollector
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doneCreate(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids, boolean insertSuccess)
    Called when a document is created in the given collection
    void
    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 cache
    void
    doneFindUncached(long timeTakenNanos, Collection<? extends Document> collection, String key, boolean docFound, boolean isSlaveOk)
    Called when a document with given key is read from remote store
    void
    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 performed
    void
    doneRemove(long timeTakenNanos, Collection<? extends Document> collection, int removeCount)
    Called when a remove operation for documents was completed.
  • Method Details

    • doneFindCached

      void doneFindCached(Collection<? extends Document> collection, String key)
      Called when a document with given key is found from the cache
      Parameters:
      collection - the collection
      key - collection key which is found
    • doneFindUncached

      void doneFindUncached(long timeTakenNanos, Collection<? extends Document> collection, String key, boolean docFound, boolean isSlaveOk)
      Called when a document with given key is read from remote store
      Parameters:
      timeTakenNanos - time taken
      collection - the collection
      key - collection key
      docFound - true if document is found
      isSlaveOk - true if find was performed against a secondary instance
    • doneQuery

      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 performed
      Parameters:
      timeTakenNanos - time taken
      collection - the collection
      fromKey - the start value (excluding)
      toKey - the end value (excluding)
      indexedProperty - true if indexedProperty was specified
      resultSize - number of documents found for given query
      lockTime - time in millis to acquire any lock (-1 if no lock was required)
      isSlaveOk - true if find was performed against a secondary instance
    • doneCreate

      void doneCreate(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids, boolean insertSuccess)
      Called when a document is created in the given collection
      Parameters:
      timeTakenNanos - time taken
      collection - the collection
      ids - list of ids request to be created
      insertSuccess - true if the insert was successful
    • doneCreateOrUpdate

      void doneCreateOrUpdate(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids)
      Called when multiple document are either created or updated.
      Parameters:
      timeTakenNanos - time taken
      collection - the collection
      ids - list of ids request to be created or updated
    • doneFindAndModify

      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.
      Parameters:
      timeTakenNanos - time taken
      collection - the collection
      key - collection which got updated or inserted
      newEntry - true if the document was newly created due to given operation
      success - true if the update was success
      retryCount - number of retries done to get the update
    • doneFindAndModify

      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.
      Parameters:
      timeTakenNanos - time taken
      collection - the collection
      ids - List of document ids which got updated
      success - true if the update was success
      retryCount - number of retries done to get the update
    • doneRemove

      void doneRemove(long timeTakenNanos, Collection<? extends Document> collection, int removeCount)
      Called when a remove operation for documents was completed.
      Parameters:
      timeTakenNanos - time taken
      collection - the collection
      removeCount - the number of removed documents
    • donePrefetch

      void donePrefetch(long timeTakenNanos, Collection<? extends Document> collection, List<String> ids)
      Called when a prefetch operation for documents was completed.
      Parameters:
      timeTakenNanos - time taken
      collection - the collection
      ids - list of IDs to prefetch / read