You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by sh...@apache.org on 2021/07/20 05:33:21 UTC
[ratis] branch master updated: RATIS-1388 Add an isEmpty method to
TaskQueue. (#487)
This is an automated email from the ASF dual-hosted git repository.
shashikant pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ratis.git
The following commit(s) were added to refs/heads/master by this push:
new 03f3b68 RATIS-1388 Add an isEmpty method to TaskQueue. (#487)
03f3b68 is described below
commit 03f3b68a77c34c25cd513080372d61d073ae0fa7
Author: Tsz-Wo Nicholas Sze <sz...@apache.org>
AuthorDate: Tue Jul 20 13:33:15 2021 +0800
RATIS-1388 Add an isEmpty method to TaskQueue. (#487)
---
ratis-common/src/main/java/org/apache/ratis/util/TaskQueue.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ratis-common/src/main/java/org/apache/ratis/util/TaskQueue.java b/ratis-common/src/main/java/org/apache/ratis/util/TaskQueue.java
index 767e308..9d7350c 100644
--- a/ratis-common/src/main/java/org/apache/ratis/util/TaskQueue.java
+++ b/ratis-common/src/main/java/org/apache/ratis/util/TaskQueue.java
@@ -57,6 +57,13 @@ public class TaskQueue {
}
/**
+ * Is this queue empty?
+ */
+ public boolean isEmpty() {
+ return q.isEmpty();
+ }
+
+ /**
* Poll the current head from this queue
* and then submit the next head, if there is any.
*/