You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2017/09/20 06:16:06 UTC
[2/2] lucene-solr:branch_7x: SOLR-11368: Abstract out DistibutedQueue
as an interface
SOLR-11368: Abstract out DistibutedQueue as an interface
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/80d0ea17
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/80d0ea17
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/80d0ea17
Branch: refs/heads/branch_7x
Commit: 80d0ea17f48fec23196e629d835b4f7a70b5aeba
Parents: 59a1f89
Author: Noble Paul <no...@apache.org>
Authored: Wed Sep 20 15:44:32 2017 +0930
Committer: Noble Paul <no...@apache.org>
Committed: Wed Sep 20 15:45:48 2017 +0930
----------------------------------------------------------------------
.../solr/common/cloud/DistributedQueue.java | 41 ++++++++++++++++++++
1 file changed, 41 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/80d0ea17/solr/solrj/src/java/org/apache/solr/common/cloud/DistributedQueue.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/DistributedQueue.java b/solr/solrj/src/java/org/apache/solr/common/cloud/DistributedQueue.java
new file mode 100644
index 0000000..d23acdb
--- /dev/null
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/DistributedQueue.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.common.cloud;
+
+import java.util.Collection;
+import java.util.function.Predicate;
+
+import org.apache.solr.common.util.Pair;
+
+public interface DistributedQueue {
+ byte[] peek() throws Exception;
+
+ byte[] peek(boolean block) throws Exception;
+
+ byte[] peek(long wait) throws Exception;
+
+ byte[] poll() throws Exception;
+
+ byte[] remove() throws Exception;
+
+ byte[] take() throws Exception;
+
+ void offer(byte[] data) throws Exception;
+
+ Collection<Pair<String, byte[]>> peekElements(int max, long waitMillis, Predicate<String> acceptFilter) throws Exception;
+
+}