ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [23/29] ignite git commit: IGNITE-1346: Field rename.
Date Wed, 02 Sep 2015 02:00:51 GMT
IGNITE-1346: Field rename.


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

Branch: refs/heads/ignite-843
Commit: 34ce97b685de9097303ee68d380b7a3d9b43348a
Parents: aec0631
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Tue Sep 1 16:40:35 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Tue Sep 1 16:40:35 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/util/GridStripedSpinBusyLock.java     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/34ce97b6/modules/core/src/main/java/org/apache/ignite/internal/util/GridStripedSpinBusyLock.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/GridStripedSpinBusyLock.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/GridStripedSpinBusyLock.java
index 678d521..614a88f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/GridStripedSpinBusyLock.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/GridStripedSpinBusyLock.java
@@ -31,16 +31,16 @@ public class GridStripedSpinBusyLock {
     /** Default amount of stripes. */
     private static final int DFLT_STRIPE_CNT = Runtime.getRuntime().availableProcessors()
* 4;
 
-    /** States; they are not subjects to false-sharing because actual values are located
far from each other. */
-    private final AtomicInteger[] states;
-
     /** Thread index. */
-    private static ThreadLocal<Integer> threadIdx = new ThreadLocal<Integer>()
{
+    private static ThreadLocal<Integer> THREAD_IDX = new ThreadLocal<Integer>()
{
         @Override protected Integer initialValue() {
             return new Random().nextInt(Integer.MAX_VALUE);
         }
     };
 
+    /** States; they are not subjects to false-sharing because actual values are located
far from each other. */
+    private final AtomicInteger[] states;
+
     /**
      * Default constructor.
      */
@@ -120,6 +120,6 @@ public class GridStripedSpinBusyLock {
      * @return State.
      */
     private AtomicInteger state() {
-        return states[threadIdx.get() % states.length];
+        return states[THREAD_IDX.get() % states.length];
     }
 }


Mime
View raw message