Interface ThrottlingStatsCollector

  • All Known Implementing Classes:
    ThrottlingStatsCollectorImpl

    public interface ThrottlingStatsCollector
    Stats Collector for throttling operation.

    It's implementation are required to provide the time taken for implementing each operation while throttling is ON.

    • Method Summary

      All Methods Instance Methods Abstract 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.
    • Method Detail

      • doneCreate

        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
        Parameters:
        throttlingTimeNanos - time taken
        collection - the collection
        ids - list of ids request to be created
        insertSuccess - true if the insert was successful
      • doneCreateOrUpdate

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

        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.
        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

        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.
        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
      • doneRemove

        void doneRemove​(long throttlingTimeNanos,
                        Collection<? extends Document> collection)
        Called when a remove operation for documents was completed.
        Parameters:
        throttlingTimeNanos - time taken
        collection - the collection