Class ThrottlingStatsCollectorImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void doneCreate​(long throttlingTimeNanos, Collection<? extends Document> collection, java.util.List<java.lang.String> ids, boolean insertSuccess)
      Called when a document is created in the given collection
      void doneCreateOrUpdate​(long throttlingTimeNanos, Collection<? extends Document> collection, java.util.List<java.lang.String> ids)
      Called when multiple document are either created or updated.
      void doneFindAndModify​(long throttlingTimeNanos, 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.
      void doneFindAndModify​(long throttlingTimeNanos, Collection<? extends Document> collection, java.util.List<java.lang.String> ids, boolean success, int retryCount)
      Called when a update operation was completed which could have affected multiple documents.
      void doneRemove​(long throttlingTimeNanos, Collection<? extends Document> collection)
      Called when a remove operation for documents was completed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ThrottlingStatsCollectorImpl

        public ThrottlingStatsCollectorImpl​(StatisticsProvider provider)
    • Method Detail

      • doneCreate

        public void doneCreate​(long throttlingTimeNanos,
                               Collection<? extends Document> collection,
                               java.util.List<java.lang.String> ids,
                               boolean insertSuccess)
        Description copied from interface: ThrottlingStatsCollector
        Called when a document is created in the given collection
        Specified by:
        doneCreate in interface ThrottlingStatsCollector
        Parameters:
        throttlingTimeNanos - time taken
        collection - the collection
        ids - list of ids request to be created
        insertSuccess - true if the insert was successful
      • doneCreateOrUpdate

        public void doneCreateOrUpdate​(long throttlingTimeNanos,
                                       Collection<? extends Document> collection,
                                       java.util.List<java.lang.String> ids)
        Description copied from interface: ThrottlingStatsCollector
        Called when multiple document are either created or updated.
        Specified by:
        doneCreateOrUpdate in interface ThrottlingStatsCollector
        Parameters:
        throttlingTimeNanos - time taken
        collection - the collection
        ids - list of ids request to be created or updated
      • doneFindAndModify

        public void doneFindAndModify​(long throttlingTimeNanos,
                                      Collection<? extends Document> collection,
                                      java.lang.String key,
                                      boolean newEntry,
                                      boolean success,
                                      int retryCount)
        Description copied from interface: ThrottlingStatsCollector
        Called when a update operation was completed which affected single document.
        Specified by:
        doneFindAndModify in interface ThrottlingStatsCollector
        Parameters:
        throttlingTimeNanos - 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

        public void doneFindAndModify​(long throttlingTimeNanos,
                                      Collection<? extends Document> collection,
                                      java.util.List<java.lang.String> ids,
                                      boolean success,
                                      int retryCount)
        Description copied from interface: ThrottlingStatsCollector
        Called when a update operation was completed which could have affected multiple documents.
        Specified by:
        doneFindAndModify in interface ThrottlingStatsCollector
        Parameters:
        throttlingTimeNanos - 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