ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/3] incubator-ignite git commit: # ignite-51
Date Fri, 06 Mar 2015 04:45:59 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-51 431897f7f -> b77698ba3


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ff54f23/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemory.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemory.java
index 57fe0bd..59cb75d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/offheap/unsafe/GridUnsafeMemory.java
@@ -414,10 +414,10 @@ public class GridUnsafeMemory {
      * @param ptr Optional pointer to allocated memory. First 4 bytes in allocated region
must contain
      *      size of allocated chunk.
      * @param val Value to store.
-     * @param plain Whether provided bytes is not some marshaled value, but rather real value.
+     * @param type Value type.
      * @return Pointer.
      */
-    public long putOffHeap(long ptr, byte[] val, boolean plain) {
+    public long putOffHeap(long ptr, byte[] val, byte type) {
         int size = val.length;
 
         assert size != 0;
@@ -433,8 +433,7 @@ public class GridUnsafeMemory {
             writeInt(ptr, size);
         }
 
-        // Must override plain flag.
-        writeByte(ptr + 4, (byte)(plain ? 1 : 0));
+        writeByte(ptr + 4, type);
         writeBytes(ptr + 5, val);
 
         return ptr;
@@ -451,21 +450,20 @@ public class GridUnsafeMemory {
     }
 
     /**
-     * Get value stored in offheap along with a flag indicating whether this is "raw bytes",
i.e. this is actual value
-     * or not.
+     * Get value stored in offheap along with a value type.
      *
      * @param ptr Pointer to read.
      * @return Stored byte array and "raw bytes" flag.
      */
-    public IgniteBiTuple<byte[], Boolean> get(long ptr) {
+    public IgniteBiTuple<byte[], Byte> get(long ptr) {
         assert ptr != 0;
 
         int size = readInt(ptr);
 
-        boolean plain = readByte(ptr + 4) == 1;
+        byte type = readByte(ptr + 4);
         byte[] bytes = readBytes(ptr + 5, size);
 
-        return new IgniteBiTuple<>(bytes, plain);
+        return new IgniteBiTuple<>(bytes, type);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ff54f23/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 264542f..fdc17d7 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
@@ -357,9 +357,11 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
         return null;
     }
 
-    /** {@inheritDoc} */
-    @Override public Cache.Entry wrapFilterLocked() {
-        assert false; return null;
+    /** @inheritDoc */
+    @Nullable @Override public CacheObject peekVisibleValue() {
+        assert false;
+
+        return null;
     }
 
     /** @inheritDoc */
@@ -617,7 +619,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
     }
 
     /** @inheritDoc */
-    @Override public <K, V> GridTuple<CacheObject> peek0(boolean failFast, GridCachePeekMode
mode,
+    @Override public GridTuple<CacheObject> peek0(boolean failFast, GridCachePeekMode
mode,
         CacheEntryPredicate[] filter, IgniteInternalTx tx)
         throws GridCacheEntryRemovedException, GridCacheFilterFailedException, IgniteCheckedException
{
         return F.t(val);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ff54f23/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java
index 61f921c..ee99778 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java
@@ -21,4 +21,5 @@ package org.apache.ignite.internal.processors.cache.query;
  *
  */
 public class GridCacheSwapScanQuerySelfTest extends GridCacheSwapScanQueryAbstractSelfTest
{
+    // No-op.
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ff54f23/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
index 952651a..96106c4 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
@@ -313,7 +313,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest
{
 
             GridCacheContext<Long, Object> ctx = cache.dht().context();
 
-            GridCloseableIterator<Map.Entry<byte[], GridCacheSwapEntry>> it =
ctx.swap().iterator(part, true);
+            GridCloseableIterator<Map.Entry<byte[], GridCacheSwapEntry>> it =
ctx.swap().iterator(part);
 
             assert it != null || vals.isEmpty();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2ff54f23/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
index 01c8bf0..7cd9785 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
@@ -35,6 +35,7 @@ import org.jetbrains.annotations.*;
 
 import javax.cache.*;
 import javax.cache.configuration.*;
+import java.io.*;
 import java.util.*;
 
 import static org.apache.ignite.cache.CacheMode.*;
@@ -360,7 +361,7 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest
{
     /**
      * Value object class.
      */
-    private static class ValueObject {
+    private static class ValueObject implements Serializable {
         /** Value. */
         @QuerySqlField
         private final int val;


Mime
View raw message