You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/03/28 06:33:11 UTC

[GitHub] sijie closed pull request #1290: Added executeOrdered to complement submitOrdered

sijie closed pull request #1290: Added executeOrdered to complement submitOrdered
URL: https://github.com/apache/bookkeeper/pull/1290
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bookkeeper-common/src/main/java/org/apache/bookkeeper/common/util/OrderedScheduler.java b/bookkeeper-common/src/main/java/org/apache/bookkeeper/common/util/OrderedScheduler.java
index b24fb95fa..bf2a6fbc8 100644
--- a/bookkeeper-common/src/main/java/org/apache/bookkeeper/common/util/OrderedScheduler.java
+++ b/bookkeeper-common/src/main/java/org/apache/bookkeeper/common/util/OrderedScheduler.java
@@ -329,6 +329,16 @@ public void submit(SafeRunnable r) {
         return chooseThread(orderingKey).submit(timedRunnable(r));
     }
 
+    /**
+     * schedules a one time action to execute with an ordering guarantee on the <tt>orderingKey</tt>.
+     *
+     * @param orderingKey order key to submit the task
+     * @param r task to run
+     */
+    public void executeOrdered(Object orderingKey, SafeRunnable r) {
+        chooseThread(orderingKey).execute(timedRunnable(r));
+    }
+
     /**
      * schedules a one time action to execute with an ordering guarantee on the key.
      *


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services