ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [10/50] incubator-ignite git commit: ignite-916 Review fixes
Date Fri, 05 Jun 2015 18:01:21 GMT
ignite-916 Review fixes


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

Branch: refs/heads/ignite-929
Commit: fbb5763a6d548d348a0617f0d770a34534b675fb
Parents: adc7b23
Author: agura <agura@gridgain.com>
Authored: Tue Jun 2 18:18:22 2015 +0300
Committer: agura <agura@gridgain.com>
Committed: Tue Jun 2 18:18:22 2015 +0300

----------------------------------------------------------------------
 .../ignite/cache/eviction/fifo/FifoEvictionPolicy.java |  6 +++---
 .../cache/eviction/fifo/FifoEvictionPolicyMBean.java   |  6 +++---
 .../ignite/cache/eviction/lru/LruEvictionPolicy.java   |  6 +++---
 .../cache/eviction/lru/LruEvictionPolicyMBean.java     |  6 +++---
 .../cache/eviction/sorted/SortedEvictionPolicy.java    |  6 +++---
 .../eviction/sorted/SortedEvictionPolicyMBean.java     |  6 +++---
 ...ridCachePartitionedMultiThreadedPutGetSelfTest.java |  2 +-
 .../cache/eviction/EvictionAbstractTest.java           | 13 ++++++-------
 .../eviction/fifo/FifoEvictionPolicySelfTest.java      |  2 +-
 .../cache/eviction/lru/LruEvictionPolicySelfTest.java  |  4 ++--
 .../eviction/sorted/SortedEvictionPolicySelfTest.java  |  2 +-
 .../testsuites/IgniteCacheEvictionSelfTestSuite.java   |  1 -
 12 files changed, 29 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicy.java
b/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicy.java
index 7222ae4..221bc39 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicy.java
@@ -136,19 +136,19 @@ public class FifoEvictionPolicy<K, V> implements EvictionPolicy<K,
V>, FifoEvict
     }
 
     /** {@inheritDoc} */
-    @Override public long getMaxMemSize() {
+    @Override public long getMaxMemorySize() {
         return maxMemSize;
     }
 
     /** {@inheritDoc} */
-    @Override public void setMaxMemSize(long maxMemSize) {
+    @Override public void setMaxMemorySize(long maxMemSize) {
         A.ensure(maxMemSize >= 0, "maxMemSize >= 0");
 
         this.maxMemSize = maxMemSize;
     }
 
     /** {@inheritDoc} */
-    @Override public long getCurrentMemSize() {
+    @Override public long getCurrentMemorySize() {
         return memSize.longValue();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicyMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicyMBean.java
b/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicyMBean.java
index c9a09ec..793aa66 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicyMBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicyMBean.java
@@ -70,13 +70,13 @@ public interface FifoEvictionPolicyMBean {
      * @return maximum allowed cache size in bytes.
      */
     @MXBeanDescription("Maximum allowed cache size in bytes.")
-    public long getMaxMemSize();
+    public long getMaxMemorySize();
 
     /**
      * Sets maximum allowed cache size in bytes.
      */
     @MXBeanDescription("Set maximum allowed cache size in bytes.")
-    public void setMaxMemSize(long maxMemSize);
+    public void setMaxMemorySize(long maxMemSize);
 
     /**
      * Gets current queue size in bytes.
@@ -84,5 +84,5 @@ public interface FifoEvictionPolicyMBean {
      * @return current queue size in bytes.
      */
     @MXBeanDescription("Current FIFO queue size in bytes.")
-    public long getCurrentMemSize();
+    public long getCurrentMemorySize();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicy.java
b/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicy.java
index d56f99a..0be26c8 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicy.java
@@ -121,19 +121,19 @@ public class LruEvictionPolicy<K, V> implements EvictionPolicy<K,
V>, LruEvictio
     }
 
     /** {@inheritDoc} */
-    @Override public long getMaxMemSize() {
+    @Override public long getMaxMemorySize() {
         return maxMemSize;
     }
 
     /** {@inheritDoc} */
-    @Override public void setMaxMemSize(long maxMemSize) {
+    @Override public void setMaxMemorySize(long maxMemSize) {
         A.ensure(maxMemSize >= 0, "maxMemSize >= 0");
 
         this.maxMemSize = maxMemSize;
     }
 
     /** {@inheritDoc} */
-    @Override public long getCurrentMemSize() {
+    @Override public long getCurrentMemorySize() {
         return memSize.longValue();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicyMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicyMBean.java
b/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicyMBean.java
index 69347ee..e17c057 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicyMBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/lru/LruEvictionPolicyMBean.java
@@ -70,13 +70,13 @@ public interface LruEvictionPolicyMBean {
      * @return maximum allowed cache size in bytes.
      */
     @MXBeanDescription("Maximum allowed cache size in bytes.")
-    public long getMaxMemSize();
+    public long getMaxMemorySize();
 
     /**
      * Sets maximum allowed cache size in bytes.
      */
     @MXBeanDescription("Set maximum allowed cache size in bytes.")
-    public void setMaxMemSize(long maxMemSize);
+    public void setMaxMemorySize(long maxMemSize);
 
     /**
      * Gets current queue size in bytes.
@@ -84,5 +84,5 @@ public interface LruEvictionPolicyMBean {
      * @return current queue size in bytes.
      */
     @MXBeanDescription("Current queue size in  bytes.")
-    public long getCurrentMemSize();
+    public long getCurrentMemorySize();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicy.java
b/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicy.java
index abfc1d0..b8b82fa 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicy.java
@@ -167,19 +167,19 @@ public class SortedEvictionPolicy<K, V> implements EvictionPolicy<K,
V>, SortedE
     }
 
     /** {@inheritDoc} */
-    @Override public long getMaxMemSize() {
+    @Override public long getMaxMemorySize() {
         return maxMemSize;
     }
 
     /** {@inheritDoc} */
-    @Override public void setMaxMemSize(long maxMemSize) {
+    @Override public void setMaxMemorySize(long maxMemSize) {
         A.ensure(maxMemSize >= 0, "maxMemSize >= 0");
 
         this.maxMemSize = maxMemSize;
     }
 
     /** {@inheritDoc} */
-    @Override public long getCurrentMemSize() {
+    @Override public long getCurrentMemorySize() {
         return memSize.longValue();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicyMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicyMBean.java
b/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicyMBean.java
index aada1ce..7283453 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicyMBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/eviction/sorted/SortedEvictionPolicyMBean.java
@@ -70,13 +70,13 @@ public interface SortedEvictionPolicyMBean {
      * @return maximum allowed cache size in bytes.
      */
     @MXBeanDescription("Maximum allowed cache size in bytes.")
-    public long getMaxMemSize();
+    public long getMaxMemorySize();
 
     /**
      * Sets maximum allowed cache size in bytes.
      */
     @MXBeanDescription("Set maximum allowed cache size in bytes.")
-    public void setMaxMemSize(long maxMemSize);
+    public void setMaxMemorySize(long maxMemSize);
 
     /**
      * Gets current sorted entries queue size in bytes.
@@ -84,5 +84,5 @@ public interface SortedEvictionPolicyMBean {
      * @return current sorted entries queue size in bytes.
      */
     @MXBeanDescription("Current sorted entries set size in bytes.")
-    public long getCurrentMemSize();
+    public long getCurrentMemorySize();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
index 1c45de8..feb94b2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
@@ -68,7 +68,7 @@ public class GridCachePartitionedMultiThreadedPutGetSelfTest extends GridCommonA
         cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
 
         FifoEvictionPolicy plc = new FifoEvictionPolicy();
-        plc.setMaxMemSize(1000);
+        plc.setMaxMemorySize(1000);
 
         cc.setEvictionPolicy(plc);
         cc.setSwapEnabled(false);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
index c2a599d..a8da54b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
@@ -460,7 +460,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?,
?>>
             info(p);
 
             assertTrue(p.getCurrentSize() <= (plcMaxMemSize > 0 ? max : max + plcBatchSize));
-            assertTrue(p.getCurrentMemSize() <= (plcMaxMemSize > 0 ? max : max + plcBatchSize)
* MockEntry.KEY_SIZE);
+            assertTrue(p.getCurrentMemorySize() <= (plcMaxMemSize > 0 ? max : max +
plcBatchSize) * MockEntry.KEY_SIZE);
         }
         finally {
             stopAllGrids();
@@ -575,7 +575,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?,
?>>
         EvictionPolicyProxy proxy = proxy(policy());
 
         assertEquals(expSize, proxy.getCurrentSize());
-        assertEquals(expSize * entrySize, proxy.getCurrentMemSize());
+        assertEquals(expSize * entrySize, proxy.getCurrentMemorySize());
     }
 
     /**
@@ -798,7 +798,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?,
?>>
 
                         EvictionPolicyProxy plc = proxy(policy(i));
 
-                        assertTrue(plc.getCurrentMemSize() <= memSize);
+                        assertTrue(plc.getCurrentMemorySize() <= memSize);
                     }
                 }
 
@@ -904,7 +904,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?,
?>>
                 for (EvictableEntry entry : proxy(policy(i)).queue())
                     size += entry.size();
 
-                assertEquals(size, proxy(policy(i)).getCurrentMemSize());
+                assertEquals(size, proxy(policy(i)).getCurrentMemorySize());
             }
             else
                 assertTrue(proxy(policy(i)).queue().size() <= plcMax + plcBatchSize);
@@ -1017,9 +1017,9 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?,
?>>
         /**
          * Current memory size.
          */
-        public long getCurrentMemSize() {
+        public long getCurrentMemorySize() {
             try {
-                return (Long)plc.getClass().getDeclaredMethod("getCurrentMemSize").invoke(plc);
+                return (Long)plc.getClass().getDeclaredMethod("getCurrentMemorySize").invoke(plc);
             }
             catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException
e) {
                 throw new RuntimeException(e);
@@ -1053,5 +1053,4 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?,
?>>
             }
         }
     }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/fifo/FifoEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/fifo/FifoEvictionPolicySelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/fifo/FifoEvictionPolicySelfTest.java
index a908259..6b6ba51 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/fifo/FifoEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/fifo/FifoEvictionPolicySelfTest.java
@@ -245,7 +245,7 @@ public class FifoEvictionPolicySelfTest extends
 
         plc.setMaxSize(this.plcMax);
         plc.setBatchSize(this.plcBatchSize);
-        plc.setMaxMemSize(this.plcMaxMemSize);
+        plc.setMaxMemorySize(this.plcMaxMemSize);
 
         return plc;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java
index 8e1e8cf..3750e5a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruEvictionPolicySelfTest.java
@@ -312,7 +312,7 @@ public class LruEvictionPolicySelfTest extends
 
         plc.setMaxSize(this.plcMax);
         plc.setBatchSize(this.plcBatchSize);
-        plc.setMaxMemSize(this.plcMaxMemSize);
+        plc.setMaxMemorySize(this.plcMaxMemSize);
 
         return plc;
     }
@@ -343,7 +343,7 @@ public class LruEvictionPolicySelfTest extends
                 for (EvictableEntry<String, String> entry : policy(i).queue())
                     size += ((CacheEvictableEntryImpl)entry).size();
 
-                assertEquals(size, ((LruEvictionPolicy)policy(i)).getCurrentMemSize());
+                assertEquals(size, ((LruEvictionPolicy)policy(i)).getCurrentMemorySize());
             }
             else
                 assertTrue(policy(i).queue().size() <= plcMax + plcBatchSize);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicySelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicySelfTest.java
index dbbbe5d..a283352 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicySelfTest.java
@@ -248,7 +248,7 @@ public class SortedEvictionPolicySelfTest extends
 
         plc.setMaxSize(this.plcMax);
         plc.setBatchSize(this.plcBatchSize);
-        plc.setMaxMemSize(this.plcMaxMemSize);
+        plc.setMaxMemorySize(this.plcMaxMemSize);
 
         return plc;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/fbb5763a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
index 917185e..7f07d3d 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
@@ -37,7 +37,6 @@ public class IgniteCacheEvictionSelfTestSuite extends TestSuite {
     public static TestSuite suite() throws Exception {
         TestSuite suite = new TestSuite("Ignite Cache Eviction Test Suite");
 
-        suite.addTest(new TestSuite(RandomEvictionPolicyCacheSizeSelfTest.class));
         suite.addTest(new TestSuite(FifoEvictionPolicySelfTest.class));
         suite.addTest(new TestSuite(SortedEvictionPolicySelfTest.class));
         suite.addTest(new TestSuite(LruEvictionPolicySelfTest.class));


Mime
View raw message