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 <[email protected]>
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.
*/