ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [28/38] incubator-ignite git commit: # ignite-41
Date Tue, 23 Dec 2014 08:23:04 GMT
# ignite-41


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

Branch: refs/heads/ignite-1
Commit: 3397461d151bf9dc42a1ab01f8903c6e6c06b24a
Parents: f537940
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Dec 22 10:20:47 2014 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Dec 22 10:20:47 2014 +0300

----------------------------------------------------------------------
 .../distributed/dht/GridDhtTxFinishFuture.java  |  7 ++--
 .../cache/transactions/IgniteTxHandler.java     |  2 +-
 .../transactions/IgniteTxLocalAdapter.java      | 10 +++---
 .../IgniteCacheExpiryPolicyAbstractTest.java    | 34 +++++++++++---------
 .../bamboo/GridDataGridTestSuite.java           |  1 -
 5 files changed, 28 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3397461d/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
index 6e35fc9..52acd1f 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridDhtTxFinishFuture.java
@@ -15,6 +15,7 @@ import org.apache.ignite.lang.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;
+import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.grid.util.future.*;
@@ -325,13 +326,13 @@ public final class GridDhtTxFinishFuture<K, V> extends GridCompoundIdentityFutur
             if (!tx.pessimistic()) {
                 int idx = 0;
 
-                for (GridCacheTxEntry<K, V> e : dhtMapping.writes())
+                for (IgniteTxEntry<K, V> e : dhtMapping.writes())
                     req.ttl(idx++, e.ttl());
 
                 if (nearMapping != null) {
                     idx = 0;
 
-                    for (GridCacheTxEntry<K, V> e : nearMapping.writes())
+                    for (IgniteTxEntry<K, V> e : nearMapping.writes())
                         req.nearTtl(idx++, e.ttl());
                 }
             }
@@ -397,7 +398,7 @@ public final class GridDhtTxFinishFuture<K, V> extends GridCompoundIdentityFutur
                 if (!tx.pessimistic()) {
                     int idx = 0;
 
-                    for (GridCacheTxEntry<K, V> e : nearMapping.writes())
+                    for (IgniteTxEntry<K, V> e : nearMapping.writes())
                         req.nearTtl(idx++, e.ttl());
                 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3397461d/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxHandler.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxHandler.java
index 2254ddb..8d3e6a0 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxHandler.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxHandler.java
@@ -836,7 +836,7 @@ public class IgniteTxHandler<K, V> {
                     else if (tx.concurrency() == OPTIMISTIC && ttls != null) {
                         int idx = 0;
 
-                        for (GridCacheTxEntry<K, V> e : tx.writeEntries())
+                        for (IgniteTxEntry<K, V> e : tx.writeEntries())
                             e.ttl(ttls.get(idx));
                     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3397461d/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxLocalAdapter.java
index a126460..14620a6 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -865,7 +865,7 @@ public abstract class IgniteTxLocalAdapter<K, V> extends IgniteTxAdapter<K,
V>
                 }
 
                 if (!near()) {
-                    for (GridCacheTxEntry<K, V> txEntry : readEntries()) {
+                    for (IgniteTxEntry<K, V> txEntry : readEntries()) {
                         Duration duration = expiryForAccess(txEntry);
 
                         if (duration != null)
@@ -878,7 +878,7 @@ public abstract class IgniteTxLocalAdapter<K, V> extends IgniteTxAdapter<K,
V>
             }
         }
         else {
-            for (GridCacheTxEntry<K, V> txEntry : readEntries()) {
+            for (IgniteTxEntry<K, V> txEntry : readEntries()) {
                 Duration duration = expiryForAccess(txEntry);
 
                 if (duration != null)
@@ -922,7 +922,7 @@ public abstract class IgniteTxLocalAdapter<K, V> extends IgniteTxAdapter<K,
V>
      * @param txEntry Tx entry.
      * @return New duration.
      */
-    @Nullable private Duration expiryForAccess(GridCacheTxEntry<K, V> txEntry) {
+    @Nullable private Duration expiryForAccess(IgniteTxEntry<K, V> txEntry) {
         ExpiryPolicy expiry = txEntry.expiry();
 
         if (expiry == null)
@@ -2919,10 +2919,10 @@ public abstract class IgniteTxLocalAdapter<K, V> extends IgniteTxAdapter<K,
V>
      * @param key Key.
      * @param expiryPlc Expiry policy.
      */
-    void entryExpiry(GridCacheTxKey<K> key, @Nullable ExpiryPolicy expiryPlc) {
+    void entryExpiry(IgniteTxKey<K> key, @Nullable ExpiryPolicy expiryPlc) {
         assert key != null;
 
-        GridCacheTxEntry<K, V> e = entry(key);
+        IgniteTxEntry<K, V> e = entry(key);
 
         if (e != null)
             e.expiry(expiryPlc);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3397461d/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
index adaee5d..2bb3bce 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
@@ -12,6 +12,7 @@ package org.apache.ignite.internal.processors.cache.expiry;
 import org.apache.ignite.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.processors.cache.*;
+import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.*;
@@ -26,11 +27,11 @@ import javax.cache.expiry.*;
 import java.util.*;
 import java.util.concurrent.*;
 
+import static org.apache.ignite.transactions.IgniteTxConcurrency.*;
+import static org.apache.ignite.transactions.IgniteTxIsolation.*;
 import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
 import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
 import static org.gridgain.grid.cache.GridCacheMode.*;
-import static org.gridgain.grid.cache.GridCacheTxConcurrency.*;
-import static org.gridgain.grid.cache.GridCacheTxIsolation.*;
 
 /**
  *
@@ -168,6 +169,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
     }
 
     /**
+     * @param key Key.
      * @throws Exception If failed.
      */
     private void txGet(Integer key) throws Exception {
@@ -177,7 +179,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
 
         checkTtl(key, 60_000L);
 
-        try (GridCacheTx tx = ignite(0).transactions().txStart()) {
+        try (IgniteTx tx = ignite(0).transactions().txStart()) {
             assertEquals((Integer)1, cache.get(key));
 
             tx.commit();
@@ -306,14 +308,14 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
         createUpdatePutAll(null);
 
         if (atomicityMode() == TRANSACTIONAL) {
-            GridCacheTxConcurrency[] txModes;
+            IgniteTxConcurrency[] txModes;
 
             if (cacheMode() == LOCAL)
-                txModes= new GridCacheTxConcurrency[]{PESSIMISTIC};
+                txModes= new IgniteTxConcurrency[]{PESSIMISTIC};
             else
-                txModes= new GridCacheTxConcurrency[]{PESSIMISTIC, OPTIMISTIC};
+                txModes= new IgniteTxConcurrency[]{PESSIMISTIC, OPTIMISTIC};
 
-            for (GridCacheTxConcurrency tx : txModes) {
+            for (IgniteTxConcurrency tx : txModes) {
                 for (final Integer key : keys()) {
                     log.info("Test createUpdate [key=" + key + ", tx=" + tx + ']');
 
@@ -335,7 +337,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
      * @param txConcurrency Not null transaction concurrency mode if explicit transaction
should be started.
      * @throws Exception If failed.
      */
-    private void createUpdatePutAll(@Nullable GridCacheTxConcurrency txConcurrency) throws
Exception {
+    private void createUpdatePutAll(@Nullable IgniteTxConcurrency txConcurrency) throws Exception
{
         Map<Integer, Integer> vals = new HashMap<>();
 
         for (int i = 0; i < 1000; i++)
@@ -345,7 +347,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
 
         cache.removeAll(vals.keySet());
 
-        GridCacheTx tx = startTx(txConcurrency);
+        IgniteTx tx = startTx(txConcurrency);
 
         // Create.
         cache.putAll(vals);
@@ -411,13 +413,13 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
      * @param txConcurrency Not null transaction concurrency mode if explicit transaction
should be started.
      * @throws Exception If failed.
      */
-    private void createUpdateCustomPolicy(Integer key, @Nullable GridCacheTxConcurrency txConcurrency)
+    private void createUpdateCustomPolicy(Integer key, @Nullable IgniteTxConcurrency txConcurrency)
         throws Exception {
         IgniteCache<Integer, Integer> cache = jcache();
 
         assertNull(cache.get(key));
 
-        GridCacheTx tx = startTx(txConcurrency);
+        IgniteTx tx = startTx(txConcurrency);
 
         cache.withExpiryPolicy(new TestPolicy(10_000L, 20_000L, 30_000L)).put(key, 1);
 
@@ -470,7 +472,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
      * @param txConcurrency Not null transaction concurrency mode if explicit transaction
should be started.
      * @throws Exception If failed.
      */
-    private void createUpdate(Integer key, @Nullable GridCacheTxConcurrency txConcurrency)
+    private void createUpdate(Integer key, @Nullable IgniteTxConcurrency txConcurrency)
         throws Exception {
         IgniteCache<Integer, Integer> cache = jcache();
 
@@ -478,7 +480,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
         for (int i = 0; i < 3; i++) {
             log.info("Iteration: " + i);
 
-            GridCacheTx tx = startTx(txConcurrency);
+            IgniteTx tx = startTx(txConcurrency);
 
             cache.put(key, 1); // Create.
 
@@ -521,11 +523,11 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
     }
 
     /**
-     * @param txConcurrency Transaction concurrency mode.
+     * @param txMode Transaction concurrency mode.
      * @return Transaction.
      */
-    @Nullable private GridCacheTx startTx(@Nullable GridCacheTxConcurrency txConcurrency)
{
-        return txConcurrency == null ? null : ignite(0).transactions().txStart(txConcurrency,
REPEATABLE_READ);
+    @Nullable private IgniteTx startTx(@Nullable IgniteTxConcurrency txMode) {
+        return txMode == null ? null : ignite(0).transactions().txStart(txMode, REPEATABLE_READ);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3397461d/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
b/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
index 796619c..cb2f5ea 100644
--- a/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
+++ b/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
@@ -112,7 +112,6 @@ public class GridDataGridTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheLocalEvictionEventSelfTest.class);
         suite.addTestSuite(GridCacheVariableTopologySelfTest.class);
         suite.addTestSuite(GridCacheLocalTxMultiThreadedSelfTest.class);
-        suite.addTestSuite(GridCacheLocalTtlSelfTest.class);
         suite.addTestSuite(GridCacheTransformEventSelfTest.class);
 
         // Partitioned cache.


Mime
View raw message