ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [19/50] [abbrv] incubator-ignite git commit: # ignite-51
Date Wed, 11 Mar 2015 10:22:01 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
index 37f4494..6ee76fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
@@ -45,7 +45,7 @@ import static org.apache.ignite.internal.GridTopic.*;
 /**
  * Continuous queries manager.
  */
-public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K,
V> {
+public class CacheContinuousQueryManager extends GridCacheManagerAdapter {
     /** */
     private static final byte CREATED_FLAG = 0b0001;
 
@@ -59,13 +59,13 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
     private static final byte EXPIRED_FLAG = 0b1000;
 
     /** Listeners. */
-    private final ConcurrentMap<UUID, CacheContinuousQueryListener<K, V>> lsnrs
= new ConcurrentHashMap8<>();
+    private final ConcurrentMap<UUID, CacheContinuousQueryListener> lsnrs = new ConcurrentHashMap8<>();
 
     /** Listeners count. */
     private final AtomicInteger lsnrCnt = new AtomicInteger();
 
     /** Internal entries listeners. */
-    private final ConcurrentMap<UUID, CacheContinuousQueryListener<K, V>> intLsnrs
= new ConcurrentHashMap8<>();
+    private final ConcurrentMap<UUID, CacheContinuousQueryListener> intLsnrs = new
ConcurrentHashMap8<>();
 
     /** Internal listeners count. */
     private final AtomicInteger intLsnrCnt = new AtomicInteger();
@@ -89,10 +89,10 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override protected void onKernalStart0() throws IgniteCheckedException {
-        Iterable<CacheEntryListenerConfiguration<K, V>> cfgs = cctx.config().getCacheEntryListenerConfigurations();
+        Iterable<CacheEntryListenerConfiguration> cfgs = cctx.config().getCacheEntryListenerConfigurations();
 
         if (cfgs != null) {
-            for (CacheEntryListenerConfiguration<K, V> cfg : cfgs)
+            for (CacheEntryListenerConfiguration cfg : cfgs)
                 executeJCacheQuery(cfg, true);
         }
     }
@@ -135,7 +135,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
         if (preload && !internal)
             return;
 
-        ConcurrentMap<UUID, CacheContinuousQueryListener<K, V>> lsnrCol;
+        ConcurrentMap<UUID, CacheContinuousQueryListener> lsnrCol;
 
         if (internal)
             lsnrCol = intLsnrCnt.get() > 0 ? intLsnrs : null;
@@ -158,13 +158,13 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
         boolean primary = cctx.affinity().primary(cctx.localNode(), key, -1);
         boolean recordIgniteEvt = !internal && cctx.gridEvents().isRecordable(EVT_CACHE_QUERY_OBJECT_READ);
 
-        for (CacheContinuousQueryListener<K, V> lsnr : lsnrCol.values()) {
+        for (CacheContinuousQueryListener lsnr : lsnrCol.values()) {
             if (preload && !lsnr.notifyExisting())
                 continue;
 
             if (!initialized) {
                 if (lsnr.oldValueRequired()) {
-                    oldVal = cctx.unwrapTemporary(oldVal);
+                    oldVal = (CacheObject)cctx.unwrapTemporary(oldVal);
 
                     if (oldVal != null)
                         oldVal.finishUnmarshal(cctx.cacheObjectContext(), cctx.deploy().globalLoader());
@@ -183,7 +183,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
                 newVal,
                 lsnr.oldValueRequired() ? oldVal : null);
 
-            CacheContinuousQueryEvent<K, V> evt = new CacheContinuousQueryEvent<>(
+            CacheContinuousQueryEvent evt = new CacheContinuousQueryEvent<>(
                 cctx.kernalContext().cache().jcache(cctx.name()), cctx, e0);
 
             lsnr.onEntryUpdated(evt, primary, recordIgniteEvt);
@@ -204,7 +204,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
         if (e.isInternal())
             return;
 
-        ConcurrentMap<UUID, CacheContinuousQueryListener<K, V>> lsnrCol = lsnrCnt.get()
> 0 ? lsnrs : null;
+        ConcurrentMap<UUID, CacheContinuousQueryListener> lsnrCol = lsnrCnt.get() >
0 ? lsnrs : null;
 
         if (F.isEmpty(lsnrCol))
             return;
@@ -215,10 +215,10 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
 
             boolean initialized = false;
 
-            for (CacheContinuousQueryListener<K, V> lsnr : lsnrCol.values()) {
+            for (CacheContinuousQueryListener lsnr : lsnrCol.values()) {
                 if (!initialized) {
                     if (lsnr.oldValueRequired())
-                        oldVal = cctx.unwrapTemporary(oldVal);
+                        oldVal = (CacheObject)cctx.unwrapTemporary(oldVal);
 
                     if (oldVal != null)
                         oldVal.finishUnmarshal(cctx.cacheObjectContext(), cctx.deploy().globalLoader());
@@ -233,7 +233,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
                    null,
                    lsnr.oldValueRequired() ? oldVal : null);
 
-                CacheContinuousQueryEvent<K, V> evt = new CacheContinuousQueryEvent(
+                CacheContinuousQueryEvent evt = new CacheContinuousQueryEvent(
                     cctx.kernalContext().cache().jcache(cctx.name()), cctx, e0);
 
                 lsnr.onEntryUpdated(evt, primary, recordIgniteEvt);
@@ -251,7 +251,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
      * @return Continuous routine ID.
      * @throws IgniteCheckedException In case of error.
      */
-    public UUID executeQuery(CacheEntryUpdatedListener<K, V> locLsnr, CacheEntryEventFilter<K,
V> rmtFilter,
+    public UUID executeQuery(CacheEntryUpdatedListener locLsnr, CacheEntryEventFilter rmtFilter,
         int bufSize, long timeInterval, boolean autoUnsubscribe, ClusterGroup grp) throws
IgniteCheckedException {
         return executeQuery0(
             locLsnr,
@@ -275,8 +275,12 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
      * @return Continuous routine ID.
      * @throws IgniteCheckedException In case of error.
      */
-    public UUID executeInternalQuery(CacheEntryUpdatedListener<K, V> locLsnr, CacheEntryEventFilter<K,
V> rmtFilter,
-        boolean loc, boolean notifyExisting) throws IgniteCheckedException {
+    public UUID executeInternalQuery(CacheEntryUpdatedListener<?, ?> locLsnr,
+        CacheEntryEventFilter rmtFilter,
+        boolean loc,
+        boolean notifyExisting)
+        throws IgniteCheckedException
+    {
         return executeQuery0(
             locLsnr,
             rmtFilter,
@@ -306,7 +310,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
      * @param onStart Whether listener is created on node start.
      * @throws IgniteCheckedException
      */
-    public void executeJCacheQuery(CacheEntryListenerConfiguration<K, V> cfg, boolean
onStart)
+    public void executeJCacheQuery(CacheEntryListenerConfiguration cfg, boolean onStart)
         throws IgniteCheckedException {
         JCacheQuery lsnr = new JCacheQuery(cfg, onStart);
 
@@ -329,7 +333,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
      * @param cfg Listener configuration.
      * @throws IgniteCheckedException In case of error.
      */
-    public void cancelJCacheQuery(CacheEntryListenerConfiguration<K, V> cfg) throws
IgniteCheckedException {
+    public void cancelJCacheQuery(CacheEntryListenerConfiguration cfg) throws IgniteCheckedException
{
         JCacheQuery lsnr = jCacheLsnrs.remove(cfg);
 
         if (lsnr != null)
@@ -351,7 +355,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
      * @return Continuous routine ID.
      * @throws IgniteCheckedException In case of error.
      */
-    private UUID executeQuery0(CacheEntryUpdatedListener<K, V> locLsnr, final CacheEntryEventFilter<K,
V> rmtFilter,
+    private UUID executeQuery0(CacheEntryUpdatedListener locLsnr, final CacheEntryEventFilter
rmtFilter,
         int bufSize, long timeInterval, boolean autoUnsubscribe, boolean internal, boolean
notifyExisting,
         boolean oldValRequired, boolean sync, boolean ignoreExpired, ClusterGroup grp) throws
IgniteCheckedException {
         cctx.checkSecurity(GridSecurityPermission.CACHE_READ);
@@ -413,10 +417,10 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
         if (notifyExisting) {
             final Iterator<GridCacheEntryEx> it = cctx.cache().allEntries().iterator();
 
-            locLsnr.onUpdated(new Iterable<CacheEntryEvent<? extends K, ? extends V>>()
{
-                @Override public Iterator<CacheEntryEvent<? extends K, ? extends V>>
iterator() {
-                    return new Iterator<CacheEntryEvent<? extends K, ? extends V>>()
{
-                        private CacheContinuousQueryEvent<? extends K, ? extends V>
next;
+            locLsnr.onUpdated(new Iterable<CacheEntryEvent>() {
+                @Override public Iterator<CacheEntryEvent> iterator() {
+                    return new Iterator<CacheEntryEvent>() {
+                        private CacheContinuousQueryEvent next;
 
                         {
                             advance();
@@ -426,11 +430,11 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
                             return next != null;
                         }
 
-                        @Override public CacheEntryEvent<? extends K, ? extends V>
next() {
+                        @Override public CacheEntryEvent next() {
                             if (!hasNext())
                                 throw new NoSuchElementException();
 
-                            CacheEntryEvent<? extends K, ? extends V> next0 = next;
+                            CacheEntryEvent next0 = next;
 
                             advance();
 
@@ -474,7 +478,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
      * @return Whether listener was actually registered.
      */
     boolean registerListener(UUID lsnrId,
-        CacheContinuousQueryListener<K, V> lsnr,
+        CacheContinuousQueryListener lsnr,
         boolean internal) {
         boolean added;
 
@@ -502,7 +506,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
      * @param id Listener ID.
      */
     void unregisterListener(boolean internal, UUID id) {
-        CacheContinuousQueryListener<K, V> lsnr;
+        CacheContinuousQueryListener lsnr;
 
         if (internal) {
             if ((lsnr = intLsnrs.remove(id)) != null) {
@@ -524,7 +528,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
      */
     private class JCacheQuery {
         /** */
-        private final CacheEntryListenerConfiguration<K, V> cfg;
+        private final CacheEntryListenerConfiguration cfg;
 
         /** */
         private final boolean onStart;
@@ -535,7 +539,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
         /**
          * @param cfg Listener configuration.
          */
-        private JCacheQuery(CacheEntryListenerConfiguration<K, V> cfg, boolean onStart)
{
+        private JCacheQuery(CacheEntryListenerConfiguration cfg, boolean onStart) {
             this.cfg = cfg;
             this.onStart = onStart;
         }
@@ -548,7 +552,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
             if (!onStart)
                 cctx.config().addCacheEntryListenerConfiguration(cfg);
 
-            CacheEntryListener<? super K, ? super V> locLsnrImpl = cfg.getCacheEntryListenerFactory().create();
+            CacheEntryListener locLsnrImpl = (CacheEntryListener)cfg.getCacheEntryListenerFactory().create();
 
             if (locLsnrImpl == null)
                 throw new IgniteCheckedException("Local CacheEntryListener is mandatory and
can't be null.");
@@ -563,11 +567,12 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
             if (types == 0)
                 throw new IgniteCheckedException("Listener must implement one of CacheEntryListener
sub-interfaces.");
 
-            CacheEntryUpdatedListener<K, V> locLsnr = (CacheEntryUpdatedListener<K,
V>)new JCacheQueryLocalListener(
-                locLsnrImpl, cctx.kernalContext().cache().jcache(cctx.name()));
+            CacheEntryUpdatedListener locLsnr = new JCacheQueryLocalListener(
+                locLsnrImpl,
+                cctx.kernalContext().cache().jcache(cctx.name()));
 
-            CacheEntryEventFilter<K, V> rmtFilter = (CacheEntryEventFilter<K, V>)new
JCacheQueryRemoteFilter<>(
-                cfg.getCacheEntryEventFilterFactory() != null ? cfg.getCacheEntryEventFilterFactory().create()
: null,
+            CacheEntryEventFilter rmtFilter = new JCacheQueryRemoteFilter(
+                cfg.getCacheEntryEventFilterFactory() != null ? (CacheEntryEventFilter)cfg.getCacheEntryEventFilterFactory().create()
: null,
                 types);
 
             routineId = executeQuery0(
@@ -687,9 +692,9 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
 
     /**
      */
-    private static class JCacheQueryRemoteFilter<K, V> implements CacheEntryEventFilter<K,
V>, Externalizable {
+    private static class JCacheQueryRemoteFilter implements CacheEntryEventFilter, Externalizable
{
         /** */
-        private CacheEntryEventFilter<K, V> impl;
+        private CacheEntryEventFilter impl;
 
         /** */
         private byte types;
@@ -709,7 +714,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
          * @param impl Filter.
          * @param types Types.
          */
-        JCacheQueryRemoteFilter(CacheEntryEventFilter<K, V> impl, byte types) {
+        JCacheQueryRemoteFilter(CacheEntryEventFilter impl, byte types) {
             assert types != 0;
 
             this.impl = impl;
@@ -717,7 +722,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
         }
 
         /** {@inheritDoc} */
-        @Override public boolean evaluate(CacheEntryEvent<? extends K, ? extends V>
evt) {
+        @Override public boolean evaluate(CacheEntryEvent evt) {
             try {
                 return (types & flag(evt.getEventType())) != 0 && (impl == null
|| impl.evaluate(evt));
             }
@@ -737,7 +742,7 @@ public class CacheContinuousQueryManager<K, V> extends GridCacheManagerAdapter<K
         /** {@inheritDoc} */
         @SuppressWarnings("unchecked")
         @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
-            impl = (CacheEntryEventFilter<K, V>)in.readObject();
+            impl = (CacheEntryEventFilter)in.readObject();
             types = in.readByte();
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index bd43d5c..fa0f293 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -1866,7 +1866,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public <K, V> IgniteInternalFuture<GridCacheReturn<CacheObject>>
putAllAsync(
+    @Override public <K, V> IgniteInternalFuture<GridCacheReturn> putAllAsync(
         GridCacheContext cacheCtx,
         Map<? extends K, ? extends V> map,
         boolean retval,
@@ -1874,7 +1874,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         long ttl,
         CacheEntryPredicate[] filter
     ) {
-        return (IgniteInternalFuture<GridCacheReturn<CacheObject>>)putAllAsync0(cacheCtx,
+        return (IgniteInternalFuture<GridCacheReturn>)putAllAsync0(cacheCtx,
             map,
             null,
             null,
@@ -1901,12 +1901,12 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public <K, V, T> IgniteInternalFuture<GridCacheReturn<Map<K,
EntryProcessorResult<T>>>> invokeAsync(
+    @Override public <K, V, T> IgniteInternalFuture<GridCacheReturn> invokeAsync(
         GridCacheContext cacheCtx,
         @Nullable Map<? extends K, ? extends EntryProcessor<K, V, Object>> map,
         Object... invokeArgs
     ) {
-        return (IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>)putAllAsync0(cacheCtx,
+        return (IgniteInternalFuture<GridCacheReturn>)putAllAsync0(cacheCtx,
             null,
             map,
             invokeArgs,
@@ -1969,7 +1969,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         boolean retval,
         boolean lockOnly,
         CacheEntryPredicate[] filter,
-        final GridCacheReturn<CacheObject> ret,
+        final GridCacheReturn ret,
         Collection<KeyCacheObject> enlisted,
         @Nullable Map<KeyCacheObject, GridCacheDrInfo> drPutMap,
         @Nullable Map<KeyCacheObject, GridCacheVersion> drRmvMap
@@ -2559,7 +2559,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
 
         init();
 
-        final GridCacheReturn<CacheObject> ret = new GridCacheReturn<>(localResult(),
false);
+        final GridCacheReturn ret = new GridCacheReturn(localResult(), false);
 
         if (F.isEmpty(map0) && F.isEmpty(invokeMap0)) {
             if (implicit())
@@ -2616,8 +2616,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                     -1L,
                     CU.empty0());
 
-                PLC1<GridCacheReturn<CacheObject>> plc1 = new PLC1<GridCacheReturn<CacheObject>>(ret)
{
-                    @Override public GridCacheReturn<CacheObject> postLock(GridCacheReturn<CacheObject>
ret)
+                PLC1<GridCacheReturn> plc1 = new PLC1<GridCacheReturn>(ret) {
+                    @Override public GridCacheReturn postLock(GridCacheReturn ret)
                         throws IgniteCheckedException
                     {
                         if (log.isDebugEnabled())
@@ -2670,11 +2670,11 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                         loadFut.get();
                     }
                     catch (IgniteCheckedException e) {
-                        return new GridFinishedFutureEx<>(new GridCacheReturn<V>(localResult()),
e);
+                        return new GridFinishedFutureEx<>(new GridCacheReturn(localResult()),
e);
                     }
 
-                    return commitAsync().chain(new CX1<IgniteInternalFuture<IgniteInternalTx>,
GridCacheReturn<Object>>() {
-                        @Override public GridCacheReturn<Object> applyx(IgniteInternalFuture<IgniteInternalTx>
txFut) throws IgniteCheckedException {
+                    return commitAsync().chain(new CX1<IgniteInternalFuture<IgniteInternalTx>,
GridCacheReturn>() {
+                        @Override public GridCacheReturn applyx(IgniteInternalFuture<IgniteInternalTx>
txFut) throws IgniteCheckedException {
                             txFut.get();
 
                             return implicitRes;
@@ -2682,8 +2682,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                     });
                 }
                 else
-                    return loadFut.chain(new CX1<IgniteInternalFuture<Set<KeyCacheObject>>,
GridCacheReturn<CacheObject>>() {
-                        @Override public GridCacheReturn<CacheObject> applyx(IgniteInternalFuture<Set<KeyCacheObject>>
f) throws IgniteCheckedException {
+                    return loadFut.chain(new CX1<IgniteInternalFuture<Set<KeyCacheObject>>,
GridCacheReturn>() {
+                        @Override public GridCacheReturn applyx(IgniteInternalFuture<Set<KeyCacheObject>>
f) throws IgniteCheckedException {
                             f.get();
 
                             return ret;
@@ -2699,7 +2699,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
     }
 
     /** {@inheritDoc} */
-    @Override public <K, V> IgniteInternalFuture<GridCacheReturn<CacheObject>>
removeAllAsync(
+    @Override public <K, V> IgniteInternalFuture<GridCacheReturn> removeAllAsync(
         GridCacheContext cacheCtx,
         Collection<? extends K> keys,
         @Nullable GridCacheEntryEx cached,
@@ -2719,7 +2719,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
      * @return Future for asynchronous remove.
      */
     @SuppressWarnings("unchecked")
-    private <K, V> IgniteInternalFuture<GridCacheReturn<CacheObject>> removeAllAsync0(
+    private <K, V> IgniteInternalFuture<GridCacheReturn> removeAllAsync0(
         final GridCacheContext cacheCtx,
         @Nullable final Collection<? extends K> keys,
         @Nullable Map<KeyCacheObject, GridCacheVersion> drMap,
@@ -2755,7 +2755,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
             return new GridFinishedFuture<>(cctx.kernalContext(), e);
         }
 
-        final GridCacheReturn<CacheObject> ret = new GridCacheReturn<>(localResult(),
false);
+        final GridCacheReturn ret = new GridCacheReturn(localResult(), false);
 
         if (F.isEmpty(keys0)) {
             if (implicit()) {
@@ -2826,8 +2826,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                     -1L,
                     CU.empty0());
 
-                PLC1<GridCacheReturn<CacheObject>> plc1 = new PLC1<GridCacheReturn<CacheObject>>(ret)
{
-                    @Override protected GridCacheReturn<CacheObject> postLock(GridCacheReturn<CacheObject>
ret)
+                PLC1<GridCacheReturn> plc1 = new PLC1<GridCacheReturn>(ret) {
+                    @Override protected GridCacheReturn postLock(GridCacheReturn ret)
                         throws IgniteCheckedException
                     {
                         if (log.isDebugEnabled())
@@ -2876,8 +2876,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                     // with prepare response, if required.
                     assert loadFut.isDone();
 
-                    return commitAsync().chain(new CX1<IgniteInternalFuture<IgniteInternalTx>,
GridCacheReturn<CacheObject>>() {
-                        @Override public GridCacheReturn<CacheObject> applyx(IgniteInternalFuture<IgniteInternalTx>
txFut)
+                    return commitAsync().chain(new CX1<IgniteInternalFuture<IgniteInternalTx>,
GridCacheReturn>() {
+                        @Override public GridCacheReturn applyx(IgniteInternalFuture<IgniteInternalTx>
txFut)
                             throws IgniteCheckedException
                         {
                             txFut.get();
@@ -2887,8 +2887,8 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                     });
                 }
                 else
-                    return loadFut.chain(new CX1<IgniteInternalFuture<Set<KeyCacheObject>>,
GridCacheReturn<CacheObject>>() {
-                        @Override public GridCacheReturn<CacheObject> applyx(IgniteInternalFuture<Set<KeyCacheObject>>
f)
+                    return loadFut.chain(new CX1<IgniteInternalFuture<Set<KeyCacheObject>>,
GridCacheReturn>() {
+                        @Override public GridCacheReturn applyx(IgniteInternalFuture<Set<KeyCacheObject>>
f)
                             throws IgniteCheckedException
                         {
                             f.get();
@@ -2974,7 +2974,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         try {
             init();
 
-            GridCacheReturn<CacheObject> ret = new GridCacheReturn<>(localResult(),
false);
+            GridCacheReturn ret = new GridCacheReturn(localResult(), false);
 
             Collection<KeyCacheObject> enlisted = new ArrayList<>();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
index 05caac6..96a044e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalEx.java
@@ -90,7 +90,7 @@ public interface IgniteTxLocalEx extends IgniteInternalTx {
      * @param ttl Time to live for entry. If negative, leave unchanged.
      * @return Future for put operation.
      */
-    public <K, V> IgniteInternalFuture<GridCacheReturn<CacheObject>> putAllAsync(
+    public <K, V> IgniteInternalFuture<GridCacheReturn> putAllAsync(
         GridCacheContext cacheCtx,
         Map<? extends K, ? extends V> map,
         boolean retval,
@@ -104,7 +104,7 @@ public interface IgniteTxLocalEx extends IgniteInternalTx {
      * @param invokeArgs Optional arguments for entry processor.
      * @return Transform operation future.
      */
-    public <K, V, T> IgniteInternalFuture<GridCacheReturn<Map<K, EntryProcessorResult<T>>>>
invokeAsync(
+    public <K, V, T> IgniteInternalFuture<GridCacheReturn> invokeAsync(
         GridCacheContext cacheCtx,
         Map<? extends K, ? extends EntryProcessor<K, V, Object>> map,
         Object... invokeArgs);
@@ -117,7 +117,7 @@ public interface IgniteTxLocalEx extends IgniteInternalTx {
      * @param filter Filter.
      * @return Future for asynchronous remove.
      */
-    public <K, V> IgniteInternalFuture<GridCacheReturn<CacheObject>> removeAllAsync(
+    public <K, V> IgniteInternalFuture<GridCacheReturn> removeAllAsync(
         GridCacheContext cacheCtx,
         Collection<? extends K> keys,
         @Nullable GridCacheEntryEx cached,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
index fdc17d7..d967a51 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
@@ -388,7 +388,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
     }
 
     /** @inheritDoc */
-    @Override public <K, V> boolean invalidate(@Nullable CacheEntryPredicate[] filter)
+    @Override public boolean invalidate(@Nullable CacheEntryPredicate[] filter)
         throws GridCacheEntryRemovedException, IgniteCheckedException {
         assert false;
 
@@ -396,7 +396,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
     }
 
     /** @inheritDoc */
-    @Override public <K, V> boolean compact(@Nullable CacheEntryPredicate[] filter)
+    @Override public boolean compact(@Nullable CacheEntryPredicate[] filter)
         throws GridCacheEntryRemovedException, IgniteCheckedException {
         assert false;
 
@@ -404,7 +404,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
     }
 
     /** @inheritDoc */
-    @Override public <K, V> boolean evictInternal(boolean swap, GridCacheVersion obsoleteVer,
+    @Override public boolean evictInternal(boolean swap, GridCacheVersion obsoleteVer,
         @Nullable CacheEntryPredicate[] filter) {
         assert false;
 
@@ -541,7 +541,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
     }
 
     /** @inheritDoc */
-    @Override public <K, V> boolean clear(GridCacheVersion ver, boolean readers,
+    @Override public boolean clear(GridCacheVersion ver, boolean readers,
         @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
         if (ver == null || ver.equals(this.ver)) {
             val = null;
@@ -614,7 +614,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
     }
 
     /** @inheritDoc */
-    @Override public <K, V> CacheObject peek(GridCachePeekMode mode, CacheEntryPredicate[]
filter) {
+    @Override public CacheObject peek(GridCachePeekMode mode, CacheEntryPredicate[] filter)
{
         return val;
     }
 
@@ -626,7 +626,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
     }
 
     /** @inheritDoc */
-    @Override public <K, V> CacheObject peek(Collection<GridCachePeekMode> modes,
+    @Override public CacheObject peek(Collection<GridCachePeekMode> modes,
         CacheEntryPredicate[] filter)
         throws GridCacheEntryRemovedException {
         return val;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
index 33ac600..9d88d41 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
@@ -290,7 +290,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest
{
                 for (Ignite g : ignites) {
                     info(">>> Checking affinity for grid: " + g.name());
 
-                    GridDhtPartitionTopology<Integer, String> top = topology(g);
+                    GridDhtPartitionTopology top = topology(g);
 
                     GridDhtPartitionFullMap fullMap = top.partitionMap(true);
 
@@ -365,7 +365,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest
{
      * @param g Grid.
      * @return Topology.
      */
-    private GridDhtPartitionTopology<Integer, String> topology(Ignite g) {
+    private GridDhtPartitionTopology topology(Ignite g) {
         return ((GridNearCacheAdapter<Integer, String>)((IgniteKernal)g).<Integer,
String>internalCache()).dht().topology();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java
index 7b9a9bc..cb62e24 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java
@@ -115,8 +115,8 @@ public class GridCacheDhtPreloadDisabledSelfTest extends GridCommonAbstractTest
      * @param i Grid index.
      * @return Topology.
      */
-    private GridDhtPartitionTopology<Integer, String> topology(int i) {
-        return near(grid(i).<Integer, String>jcache(null)).dht().topology();
+    private GridClientPartitionTopology topology(int i) {
+        return (GridClientPartitionTopology)near(grid(i).jcache(null)).dht().topology();
     }
 
     /** @throws Exception If failed. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
index af774f7..426f1dd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
@@ -310,7 +310,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest
{
 
             for (int i = 0; i < keyCnt; i++) {
                 if (aff.mapPartitionToPrimaryAndBackups(aff.partition(i)).contains(last.cluster().localNode()))
{
-                    GridDhtPartitionTopology<Integer, String> top = dht.topology();
+                    GridDhtPartitionTopology top = dht.topology();
 
                     for (GridDhtLocalPartition p : top.localPartitions()) {
                         Collection<ClusterNode> moving = top.moving(p.id());
@@ -574,7 +574,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest
{
 
             for (int i = 0; i < keyCnt; i++) {
                 if (aff.mapPartitionToPrimaryAndBackups(aff.partition(i)).contains(last.cluster().localNode()))
{
-                    GridDhtPartitionTopology<Integer, String> top = dht.topology();
+                    GridDhtPartitionTopology top = dht.topology();
 
                     for (GridDhtLocalPartition p : top.localPartitions()) {
                         Collection<ClusterNode> moving = top.moving(p.id());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
index a17266c..9aaa1f0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
@@ -214,7 +214,7 @@ public class GridCacheDhtPreloadStartStopSelfTest extends GridCommonAbstractTest
 
             for (int i = 0; i < keyCnt; i++) {
                 if (aff.mapPartitionToPrimaryAndBackups(aff.partition(i)).contains(g1.cluster().localNode()))
{
-                    GridDhtPartitionTopology<Integer, String> top = dht.topology();
+                    GridDhtPartitionTopology top = dht.topology();
 
                     for (GridDhtLocalPartition p : top.localPartitions())
                         assertEquals("Invalid partition state for partition: " + p, OWNING,
p.state());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtTestUtils.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtTestUtils.java
index f9bffcf..2efdd7e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtTestUtils.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtTestUtils.java
@@ -64,7 +64,7 @@ public class GridCacheDhtTestUtils {
             throw new IgniteCheckedException("Failed to get cache map.", e);
         }
 
-        GridDhtPartitionTopology<Integer,String> top = dht.topology();
+        GridDhtPartitionTopology top = dht.topology();
 
         GridCacheContext ctx = dht.context();
 
@@ -103,7 +103,7 @@ public class GridCacheDhtTestUtils {
         Ignite ignite = dht.context().grid();
         ClusterNode locNode = ignite.cluster().localNode();
 
-        GridDhtPartitionTopology<Integer, String> top = dht.topology();
+        GridDhtPartitionTopology top = dht.topology();
 
         System.out.println("\nTopology of cache #" + idx + " (" + locNode.id() + ")" + ":");
         System.out.println("----------------------------------");
@@ -174,7 +174,7 @@ public class GridCacheDhtTestUtils {
         Ignite ignite = dht.context().grid();
         ClusterNode locNode = ignite.cluster().localNode();
 
-        GridDhtPartitionTopology<Integer,String> top = dht.topology();
+        GridDhtPartitionTopology top = dht.topology();
 
         // Expected partitions calculated with affinity function.
         // They should be in topology in OWNING state.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
index b8a3cc9..05f4338 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSalvageSelfTest.java
@@ -243,7 +243,7 @@ public class GridCachePartitionedTxSalvageSelfTest extends GridCommonAbstractTes
 
         IgniteKernal kernal = (IgniteKernal) ignite;
 
-        GridCacheAffinityManager<Object, Object> affMgr = kernal.internalCache().context().affinity();
+        GridCacheAffinityManager affMgr = kernal.internalCache().context().affinity();
 
         for (int i = 0; i < KEY_CNT * GRID_CNT * 1.5; i++) {
             if (!affMgr.localNode((Object)i, kernal.context().discovery().topologyVersion()))
{

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
index 0af44e1..50a7c4c 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/hashmap/GridCacheTestContext.java
@@ -63,9 +63,9 @@ public class GridCacheTestContext<K, V> extends GridCacheContext<K,
V> {
                 new CacheConfiguration()),
             new GridCacheEvictionManager<K, V>(),
             new GridCacheLocalQueryManager<K, V>(),
-            new CacheContinuousQueryManager<K, V>(),
-            new GridCacheAffinityManager<K, V>(),
-            new CacheDataStructuresManager<K, V>(),
+            new CacheContinuousQueryManager(),
+            new GridCacheAffinityManager(),
+            new CacheDataStructuresManager(),
             new GridCacheTtlManager(),
             new GridOsCacheDrManager(),
             new CacheNoopJtaManager());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
index 6175a2f..88e7c7b 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
@@ -886,7 +886,7 @@ public final class GridTestUtils {
         for (Ignite g : Ignition.allGrids()) {
             GridCache<K, V> cache = ((IgniteEx)g).cachex(cacheName);
 
-            GridDhtPartitionTopology<?, ?> top = dht(cache).topology();
+            GridDhtPartitionTopology top = dht(cache).topology();
 
             while (true) {
                 boolean wait = false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57ae9ec6/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index f1e813f..caaebc1 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -370,7 +370,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest
{
 
                     GridDhtCacheAdapter<?, ?> dht = dht(c);
 
-                    GridDhtPartitionTopology<?, ?> top = dht.topology();
+                    GridDhtPartitionTopology top = dht.topology();
 
                     for (int p = 0; p < aff.partitions(); p++) {
                         long start = 0;


Mime
View raw message