ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [46/50] ignite git commit: Removed unnecessary iterator adapter.
Date Mon, 14 Aug 2017 10:30:56 GMT
Removed unnecessary iterator adapter.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4b6383a4
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4b6383a4
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4b6383a4

Branch: refs/heads/ignite-5991-6019
Commit: 4b6383a4739584fd26d2e81712ead03f20c15393
Parents: d7f42d6
Author: devozerov <vozerov@gridgain.com>
Authored: Mon Aug 14 13:16:38 2017 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Mon Aug 14 13:16:38 2017 +0300

----------------------------------------------------------------------
 .../query/h2/twostep/GridMergeIndexeIterator.java | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4b6383a4/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexeIterator.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexeIterator.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexeIterator.java
index 16499b1..f3cfc37 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexeIterator.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridMergeIndexeIterator.java
@@ -25,14 +25,13 @@ import java.util.NoSuchElementException;
 
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.internal.util.GridCloseableIteratorAdapterEx;
 import org.h2.index.Cursor;
 import org.h2.result.Row;
 
 /**
  * Iterator that transparently and sequentially traverses a bunch of {@link GridMergeIndex}
objects.
  */
-class GridMergeIndexeIterator extends GridCloseableIteratorAdapterEx<List<?>>
{
+class GridMergeIndexeIterator implements Iterator<List<?>> {
     /** Reduce query executor. */
     private final GridReduceQueryExecutor rdcExec;
 
@@ -85,13 +84,13 @@ class GridMergeIndexeIterator extends GridCloseableIteratorAdapterEx<List<?>>
{
     }
 
     /** {@inheritDoc} */
-    @Override public boolean onHasNext() throws IgniteCheckedException {
+    @Override public boolean hasNext() {
         return next != null;
     }
 
     /** {@inheritDoc} */
-    @Override public List<?> onNext() throws IgniteCheckedException {
-        final List<?> res = next;
+    @Override public List<?> next() {
+        List<Object> res = next;
 
         if (res == null)
             throw new NoSuchElementException();
@@ -101,12 +100,15 @@ class GridMergeIndexeIterator extends GridCloseableIteratorAdapterEx<List<?>>
{
         return res;
     }
 
+    /** {@inheritDoc} */
+    @Override public void remove() {
+        throw new UnsupportedOperationException("Remove is not supported");
+    }
+
     /**
      * Advance iterator.
-     *
-     * @throws IgniteCheckedException if failed.
      */
-    private void advance() throws IgniteCheckedException {
+    private void advance() {
         next = null;
 
         try {


Mime
View raw message