#ignite-707: rename ttl.

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

Branch: refs/heads/ignite-sprint-4
Commit: c7a206f784a9da2bf229b073468117a1fbb6167c
Parents: 260a494
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Thu Apr 9 16:11:04 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Thu Apr 9 16:11:04 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      | 27 ++++++++------------
 .../cache/GridCacheProjectionImpl.java          |  4 +--
 .../dht/atomic/GridDhtAtomicCache.java          | 13 +++++-----
 .../distributed/near/GridNearAtomicCache.java   | 12 +++------
 .../local/atomic/GridLocalAtomicCache.java      |  4 ---
 5 files changed, 22 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7a206f7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 21699cc..ff16d13 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -2007,7 +2007,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     /** {@inheritDoc} */
     @Override public V put(K key, V val, @Nullable CacheEntryPredicate... 
filter)
         throws IgniteCheckedException {
-        return put0(key, val, null, -1, filter);
+        return put0(key, val, null, filter);
     }
 
     /**
@@ -2016,7 +2016,6 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
      * @param key Key.
      * @param val Value.
      * @param cached Cached entry. If not provided, equivalent to 
{CacheProjection#put}.
-     * @param ttl Optional time-to-live. If negative, leaves ttl value 
unchanged.
      * @param filter Optional filter.
      * @return Previous value.
      * @throws IgniteCheckedException If failed.
@@ -2024,7 +2023,6 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
     @Nullable public V put0(final K key,
                             final V val,
                             @Nullable final GridCacheEntryEx cached,
-                            final long ttl,
                             @Nullable final CacheEntryPredicate[] filter)
         throws IgniteCheckedException
     {
@@ -2041,7 +2039,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
 
         V prevVal = syncOp(new SyncOp<V>(true) {
             @Override public V op(IgniteTxLocalAdapter tx) throws 
IgniteCheckedException {
-                return (V)tx.putAllAsync(ctx, F.t(key, val), true, cached, 
ttl, filter).get().value();
+                return (V)tx.putAllAsync(ctx, F.t(key, val), true, cached, -1, 
filter).get().value();
             }
 
             @Override public String toString() {
@@ -2061,13 +2059,11 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
      * @param key Key.
      * @param val Value.
      * @param cached Cached entry. If not provided, equivalent to 
{CacheProjection#put}.
-     * @param ttl Optional time-to-live. If negative, leaves ttl value 
unchanged.
      * @param filter Optional filter.
      * @return Previous value.
      * @throws IgniteCheckedException If failed.
      */
-    public boolean putx0(final K key, final V val, @Nullable final 
GridCacheEntryEx cached,
-                         final long ttl, @Nullable final 
CacheEntryPredicate... filter) throws IgniteCheckedException {
+    public boolean putx0(final K key, final V val, @Nullable final 
GridCacheEntryEx cached, @Nullable final CacheEntryPredicate... filter) throws 
IgniteCheckedException {
         A.notNull(key, "key", val, "val");
 
         if (keyCheck)
@@ -2077,7 +2073,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
 
         return syncOp(new SyncOp<Boolean>(true) {
             @Override public Boolean op(IgniteTxLocalAdapter tx) throws 
IgniteCheckedException {
-                return tx.putAllAsync(ctx, F.t(key, val), false, cached, ttl, 
filter).get().success();
+                return tx.putAllAsync(ctx, F.t(key, val), false, cached, -1, 
filter).get().success();
             }
 
             @Override public String toString() {
@@ -2093,7 +2089,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
 
         final long start = statsEnabled ? System.nanoTime() : 0L;
 
-        IgniteInternalFuture<V> fut = putAsync0(key, val, null, -1, filter);
+        IgniteInternalFuture<V> fut = putAsync0(key, val, null, filter);
 
         if (statsEnabled)
             fut.listen(new UpdatePutAndGetTimeStatClosure<V>(metrics0(), 
start));
@@ -2107,12 +2103,10 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
      * @param key Key.
      * @param val Value.
      * @param entry Optional cached entry.
-     * @param ttl Optional time-to-live value. If negative, leaves ttl value 
unchanged.
      * @param filter Optional filter.
      * @return Put operation future.
      */
-    public IgniteInternalFuture<V> putAsync0(final K key, final V val, 
@Nullable final GridCacheEntryEx entry,
-                                             final long ttl, @Nullable final 
CacheEntryPredicate... filter) {
+    public IgniteInternalFuture<V> putAsync0(final K key, final V val, 
@Nullable final GridCacheEntryEx entry, @Nullable final CacheEntryPredicate... 
filter) {
         A.notNull(key, "key", val, "val");
 
         if (keyCheck)
@@ -2122,7 +2116,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
 
         return asyncOp(new AsyncOp<V>(key) {
             @Override public IgniteInternalFuture<V> op(IgniteTxLocalAdapter 
tx) {
-                return tx.putAllAsync(ctx, F.t(key, val), true, entry, ttl, 
filter)
+                return tx.putAllAsync(ctx, F.t(key, val), true, entry, -1, 
filter)
                     
.chain((IgniteClosure<IgniteInternalFuture<GridCacheReturn>, V>)RET2VAL);
             }
 
@@ -2406,7 +2400,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
 
         final long start = statsEnabled ? System.nanoTime() : 0L;
 
-        IgniteInternalFuture<Boolean> fut = putxAsync0(key, val, null, -1, 
filter);
+        IgniteInternalFuture<Boolean> fut = putxAsync0(key, val, null, filter);
 
         if (statsEnabled)
             fut.listen(new UpdatePutTimeStatClosure<Boolean>(metrics0(), 
start));
@@ -2420,12 +2414,11 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
      * @param key Key.
      * @param val Value.
      * @param entry Cached entry. If not provided, equivalent to 
{CacheProjection#put}.
-     * @param ttl Optional time-to-live. If negative, leave ttl value 
unchanged.
      * @param filter Optional filter.
      * @return Putx operation future.
      */
     public IgniteInternalFuture<Boolean> putxAsync0(final K key, final V val,
-                                                    @Nullable final 
GridCacheEntryEx entry, final long ttl,
+                                                    @Nullable final 
GridCacheEntryEx entry,
                                                     @Nullable final 
CacheEntryPredicate... filter) {
         A.notNull(key, "key", val, "val");
 
@@ -2436,7 +2429,7 @@ public abstract class GridCacheAdapter<K, V> implements 
GridCache<K, V>,
 
         return asyncOp(new AsyncOp<Boolean>(key) {
             @Override public IgniteInternalFuture<Boolean> 
op(IgniteTxLocalAdapter tx) {
-                return tx.putAllAsync(ctx, F.t(key, val), false, entry, ttl, 
filter).chain(
+                return tx.putAllAsync(ctx, F.t(key, val), false, entry, -1, 
filter).chain(
                     (IgniteClosure<IgniteInternalFuture<GridCacheReturn>, 
Boolean>) RET2FLAG);
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7a206f7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index d425266..42d1eb7 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -350,7 +350,7 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<V> putAsync(K key, V val,
         @Nullable CacheEntryPredicate[] filter) {
-        return cache.putAsync0(key, val, null, -1, filter);
+        return cache.putAsync0(key, val, null, filter);
     }
 
     /** {@inheritDoc} */
@@ -414,7 +414,7 @@ public class GridCacheProjectionImpl<K, V> implements 
GridCacheProjectionEx<K, V
     /** {@inheritDoc} */
     @Override public IgniteInternalFuture<Boolean> putxAsync(K key, V val,
         @Nullable CacheEntryPredicate[] filter) {
-        return cache.putxAsync0(key, val, null, -1, filter);
+        return cache.putxAsync0(key, val, null, filter);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7a206f7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index e5ec89a..961d830 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -301,15 +301,15 @@ public class GridDhtAtomicCache<K, V> extends 
GridDhtCacheAdapter<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public V put0(K key, V val, @Nullable GridCacheEntryEx cached, 
long ttl,
+    @Override public V put0(K key, V val, @Nullable GridCacheEntryEx cached,
                             @Nullable CacheEntryPredicate[] filter) throws 
IgniteCheckedException {
-        return putAsync0(key, val, cached, ttl, filter).get();
+        return putAsync0(key, val, cached, filter).get();
     }
 
     /** {@inheritDoc} */
     @Override public boolean putx0(K key, V val, @Nullable GridCacheEntryEx 
cached,
-                                   long ttl, @Nullable CacheEntryPredicate... 
filter) throws IgniteCheckedException {
-        return putxAsync0(key, val, cached, ttl, filter).get();
+                                   @Nullable CacheEntryPredicate... filter) 
throws IgniteCheckedException {
+        return putxAsync0(key, val, cached, filter).get();
     }
 
     /** {@inheritDoc} */
@@ -320,8 +320,7 @@ public class GridDhtAtomicCache<K, V> extends 
GridDhtCacheAdapter<K, V> {
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public IgniteInternalFuture<V> putAsync0(K key, V val, @Nullable 
GridCacheEntryEx entry,
-                                                       long ttl, @Nullable 
CacheEntryPredicate... filter) {
+    @Override public IgniteInternalFuture<V> putAsync0(K key, V val, @Nullable 
GridCacheEntryEx entry, @Nullable CacheEntryPredicate... filter) {
         A.notNull(key, "key");
 
         return updateAllAsync0(F0.asMap(key, val),
@@ -337,7 +336,7 @@ public class GridDhtAtomicCache<K, V> extends 
GridDhtCacheAdapter<K, V> {
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public IgniteInternalFuture<Boolean> putxAsync0(K key, V val, 
@Nullable GridCacheEntryEx entry, long ttl,
+    @Override public IgniteInternalFuture<Boolean> putxAsync0(K key, V val, 
@Nullable GridCacheEntryEx entry,
                                                               @Nullable 
CacheEntryPredicate... filter) {
         A.notNull(key, "key");
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7a206f7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
index cbea18c..db1e8c0 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
@@ -392,19 +392,17 @@ public class GridNearAtomicCache<K, V> extends 
GridNearCacheAdapter<K, V> {
         K key,
         V val,
         @Nullable GridCacheEntryEx cached,
-        long ttl,
         @Nullable CacheEntryPredicate[] filter
     ) throws IgniteCheckedException {
-        return dht.put0(key, val, cached, ttl, filter);
+        return dht.put0(key, val, cached, filter);
     }
 
     /** {@inheritDoc} */
     @Override public boolean putx0(K key,
                                    V val,
                                    @Nullable GridCacheEntryEx cached,
-                                   long ttl,
                                    @Nullable CacheEntryPredicate... filter) 
throws IgniteCheckedException {
-        return dht.putx0(key, val, cached, ttl, filter);
+        return dht.putx0(key, val, cached, filter);
     }
 
     /** {@inheritDoc} */
@@ -419,9 +417,8 @@ public class GridNearAtomicCache<K, V> extends 
GridNearCacheAdapter<K, V> {
     @Override public IgniteInternalFuture<V> putAsync0(K key,
                                                        V val,
                                                        @Nullable 
GridCacheEntryEx entry,
-                                                       long ttl,
                                                        @Nullable 
CacheEntryPredicate... filter) {
-        return dht.putAsync0(key, val, entry, ttl, filter);
+        return dht.putAsync0(key, val, entry, filter);
     }
 
     /** {@inheritDoc} */
@@ -429,9 +426,8 @@ public class GridNearAtomicCache<K, V> extends 
GridNearCacheAdapter<K, V> {
     @Override public IgniteInternalFuture<Boolean> putxAsync0(K key,
                                                               V val,
                                                               @Nullable 
GridCacheEntryEx entry,
-                                                              long ttl,
                                                               @Nullable 
CacheEntryPredicate... filter) {
-        return dht.putxAsync0(key, val, entry, ttl, filter);
+        return dht.putxAsync0(key, val, entry, filter);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c7a206f7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index ad78819..8c6f777 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -103,7 +103,6 @@ public class GridLocalAtomicCache<K, V> extends 
GridCacheAdapter<K, V> {
     @Override public V put0(K key,
                             V val,
                             @Nullable GridCacheEntryEx cached,
-                            long ttl,
                             @Nullable CacheEntryPredicate[] filter) throws 
IgniteCheckedException {
         A.notNull(key, "key", val, "val");
 
@@ -123,7 +122,6 @@ public class GridLocalAtomicCache<K, V> extends 
GridCacheAdapter<K, V> {
     @Override public boolean putx0(K key,
                                    V val,
                                    @Nullable GridCacheEntryEx cached,
-                                   long ttl,
                                    @Nullable CacheEntryPredicate... filter) 
throws IgniteCheckedException {
         A.notNull(key, "key", val, "val");
 
@@ -160,7 +158,6 @@ public class GridLocalAtomicCache<K, V> extends 
GridCacheAdapter<K, V> {
     @Override public IgniteInternalFuture<V> putAsync0(K key,
                                                        V val,
                                                        @Nullable 
GridCacheEntryEx entry,
-                                                       long ttl,
                                                        @Nullable 
CacheEntryPredicate... filter) {
         A.notNull(key, "key", val, "val");
 
@@ -177,7 +174,6 @@ public class GridLocalAtomicCache<K, V> extends 
GridCacheAdapter<K, V> {
     @Override public IgniteInternalFuture<Boolean> putxAsync0(K key,
                                                               V val,
                                                               @Nullable 
GridCacheEntryEx entry,
-                                                              long ttl,
                                                               @Nullable 
CacheEntryPredicate... filter) {
         A.notNull(key, "key", val, "val");
 

Reply via email to