[infinispan-commits] Infinispan SVN: r408 - trunk/core/src/main/java/org/infinispan/marshall.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Wed Jun 3 13:28:07 EDT 2009


Author: galder.zamarreno at jboss.com
Date: 2009-06-03 13:28:06 -0400 (Wed, 03 Jun 2009)
New Revision: 408

Modified:
   trunk/core/src/main/java/org/infinispan/marshall/MarshallerImpl.java
Log:
[ISPN-80] (InternalCacheEntry marshalling with MarshallerImpl appears to be broken) Fixed same issue for InternalCacheValue instances too. Note: Even though MarshallerImpl is deprecated, I fixed this to be able to compare payload sizes between different marshallers.

Modified: trunk/core/src/main/java/org/infinispan/marshall/MarshallerImpl.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/marshall/MarshallerImpl.java	2009-06-03 17:23:29 UTC (rev 407)
+++ trunk/core/src/main/java/org/infinispan/marshall/MarshallerImpl.java	2009-06-03 17:28:06 UTC (rev 408)
@@ -317,26 +317,23 @@
       if (icv.getClass().equals(ImmortalCacheValue.class)) {
          out.writeByte(MAGICNUMBER_ICV_IMMORTAL);
          marshallObject(icv.getValue(), out, refMap);
-
       } else if (icv.getClass().equals(MortalCacheValue.class)) {
          out.writeByte(MAGICNUMBER_ICV_MORTAL);
          marshallObject(icv.getValue(), out, refMap);
          writeUnsignedLong(out, icv.getCreated());
-         out.writeLong(icv.getLifespan()); // could be negative so should not use unsigned longs
-
+         marshallObject(icv.getLifespan(), out, refMap); // could be negative so should not use unsigned longs
       } else if (icv.getClass().equals(TransientCacheValue.class)) {
          out.writeByte(MAGICNUMBER_ICV_TRANSIENT);
          marshallObject(icv.getValue(), out, refMap);
          writeUnsignedLong(out, icv.getLastUsed());
-         out.writeLong(icv.getMaxIdle()); // could be negative so should not use unsigned longs
-
+         marshallObject(icv.getMaxIdle(), out, refMap); // could be negative so should not use unsigned longs
       } else if (icv.getClass().equals(TransientMortalCacheValue.class)) {
          out.writeByte(MAGICNUMBER_ICV_TRANSIENT_MORTAL);
          marshallObject(icv.getValue(), out, refMap);
          writeUnsignedLong(out, icv.getCreated());
-         out.writeLong(icv.getLifespan()); // could be negative so should not use unsigned longs
+         marshallObject(icv.getLifespan(), out, refMap); // could be negative so should not use unsigned longs
          writeUnsignedLong(out, icv.getLastUsed());
-         out.writeLong(icv.getMaxIdle()); // could be negative so should not use unsigned longs
+         marshallObject(icv.getMaxIdle(), out, refMap); // could be negative so should not use unsigned longs
       }
    }
 




More information about the infinispan-commits mailing list