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 2015/08/06 22:13:57 UTC

svn commit: r1694564 - /lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java

Author: noble
Date: Thu Aug  6 20:13:56 2015
New Revision: 1694564

URL: http://svn.apache.org/r1694564
Log:
SOLR-7757: Pair is not available in java 7

Modified:
    lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java

Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java?rev=1694564&r1=1694563&r2=1694564&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java (original)
+++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java Thu Aug  6 20:13:56 2015
@@ -18,6 +18,7 @@ package org.apache.solr.common.cloud;
  */
 
 import java.io.Closeable;
+import java.io.Serializable;
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.util.ArrayList;
@@ -34,6 +35,7 @@ import java.util.concurrent.ScheduledExe
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 
+import javafx.beans.NamedArg;
 import javafx.util.Pair;
 import org.apache.solr.common.Callable;
 import org.apache.solr.common.SolrException;
@@ -439,6 +441,26 @@ public class ZkStateReader implements Cl
     }
   }
 
+  static public class Pair<K, V> implements Serializable {
+    private K key;
+
+    public K getKey() {
+      return key;
+    }
+
+    private V value;
+
+    public V getValue() {
+      return value;
+    }
+
+    public Pair(K key, V value) {
+      this.key = key;
+      this.value = value;
+    }
+  }
+
+
   private void addSecuritynodeWatcher(final String path, final Callable<Pair<byte[], Stat>> callback)
       throws KeeperException, InterruptedException {
     zkClient.exists(SOLR_SECURITY_CONF_PATH,