ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [11/43] ignite git commit: Fixed code style.
Date Thu, 11 Feb 2016 23:27:46 GMT
Fixed code style.


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

Branch: refs/heads/ignite-2249
Commit: bad042097f5030c6eef31f4a24e987876ae9176e
Parents: e88cc67
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Feb 8 09:47:27 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Feb 8 09:47:27 2016 +0300

----------------------------------------------------------------------
 .../util/nio/SelectedSelectionKeySet.java       | 65 +++++++++++++-------
 1 file changed, 43 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bad04209/modules/core/src/main/java/org/apache/ignite/internal/util/nio/SelectedSelectionKeySet.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/SelectedSelectionKeySet.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/SelectedSelectionKeySet.java
index 9aa245d..389975a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/SelectedSelectionKeySet.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/SelectedSelectionKeySet.java
@@ -21,63 +21,85 @@ import java.nio.channels.SelectionKey;
 import java.util.AbstractSet;
 import java.util.Iterator;
 
+/**
+ *
+ */
 final class SelectedSelectionKeySet extends AbstractSet<SelectionKey> {
-
+    /** */
     private SelectionKey[] keysA;
+
+    /** */
     private int keysASize;
+
+    /** */
     private SelectionKey[] keysB;
+
+    /** */
     private int keysBSize;
+
+    /** */
     private boolean isA = true;
 
+    /**
+     *
+     */
     SelectedSelectionKeySet() {
         keysA = new SelectionKey[1024];
         keysB = keysA.clone();
     }
 
-    @Override
-    public boolean add(SelectionKey o) {
-        if (o == null) {
+    /** {@inheritDoc} */
+    @Override public boolean add(SelectionKey o) {
+        if (o == null)
             return false;
-        }
 
         if (isA) {
             int size = keysASize;
             keysA[size ++] = o;
             keysASize = size;
-            if (size == keysA.length) {
+            if (size == keysA.length)
                 doubleCapacityA();
-            }
-        } else {
+        }
+        else {
             int size = keysBSize;
             keysB[size ++] = o;
             keysBSize = size;
-            if (size == keysB.length) {
+            if (size == keysB.length)
                 doubleCapacityB();
-            }
         }
 
         return true;
     }
 
+    /**
+     *
+     */
     private void doubleCapacityA() {
         SelectionKey[] newKeysA = new SelectionKey[keysA.length << 1];
         System.arraycopy(keysA, 0, newKeysA, 0, keysASize);
         keysA = newKeysA;
     }
 
+    /**
+     *
+     */
     private void doubleCapacityB() {
         SelectionKey[] newKeysB = new SelectionKey[keysB.length << 1];
         System.arraycopy(keysB, 0, newKeysB, 0, keysBSize);
         keysB = newKeysB;
     }
 
+    /**
+     * @return Selection keys.
+     */
     SelectionKey[] flip() {
         if (isA) {
             isA = false;
             keysA[keysASize] = null;
             keysBSize = 0;
             return keysA;
-        } else {
+        }
+        else {
             isA = true;
             keysB[keysBSize] = null;
             keysASize = 0;
@@ -85,27 +107,26 @@ final class SelectedSelectionKeySet extends AbstractSet<SelectionKey>
{
         }
     }
 
-    @Override
-    public int size() {
-        if (isA) {
+    /** {@inheritDoc} */
+    @Override public int size() {
+        if (isA)
             return keysASize;
-        } else {
+        else
             return keysBSize;
-        }
     }
 
-    @Override
-    public boolean remove(Object o) {
+    /** {@inheritDoc} */
+    @Override public boolean remove(Object o) {
         return false;
     }
 
-    @Override
-    public boolean contains(Object o) {
+    /** {@inheritDoc} */
+    @Override public boolean contains(Object o) {
         return false;
     }
 
-    @Override
-    public Iterator<SelectionKey> iterator() {
+    /** {@inheritDoc} */
+    @Override public Iterator<SelectionKey> iterator() {
         throw new UnsupportedOperationException();
     }
 }


Mime
View raw message