[infinispan-commits] Infinispan SVN: r407 - trunk/core/src/main/java/org/infinispan/marshall.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Wed Jun 3 13:23:30 EDT 2009
Author: galder.zamarreno at jboss.com
Date: 2009-06-03 13:23:29 -0400 (Wed, 03 Jun 2009)
New Revision: 407
Modified:
trunk/core/src/main/java/org/infinispan/marshall/MarshallerImpl.java
Log:
[ISPN-80] (InternalCacheEntry marshalling with MarshallerImpl appears to be broken) Fixed. 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 15:07:27 UTC (rev 406)
+++ trunk/core/src/main/java/org/infinispan/marshall/MarshallerImpl.java 2009-06-03 17:23:29 UTC (rev 407)
@@ -290,29 +290,26 @@
out.writeByte(MAGICNUMBER_ICE_IMMORTAL);
marshallObject(ice.getKey(), out, refMap);
marshallObject(ice.getValue(), out, refMap);
-
} else if (ice.getClass().equals(MortalCacheEntry.class)) {
out.writeByte(MAGICNUMBER_ICE_MORTAL);
marshallObject(ice.getKey(), out, refMap);
marshallObject(ice.getValue(), out, refMap);
writeUnsignedLong(out, ice.getCreated());
- out.writeLong(ice.getLifespan()); // could be negative so should not use unsigned longs
-
+ marshallObject(ice.getLifespan(), out, refMap); // could be negative so should not use unsigned longs
} else if (ice.getClass().equals(TransientCacheEntry.class)) {
out.writeByte(MAGICNUMBER_ICE_TRANSIENT);
marshallObject(ice.getKey(), out, refMap);
marshallObject(ice.getValue(), out, refMap);
writeUnsignedLong(out, ice.getLastUsed());
- out.writeLong(ice.getMaxIdle()); // could be negative so should not use unsigned longs
-
+ marshallObject(ice.getMaxIdle(), out, refMap); // could be negative so should not use unsigned longs
} else if (ice.getClass().equals(TransientMortalCacheEntry.class)) {
out.writeByte(MAGICNUMBER_ICE_TRANSIENT_MORTAL);
marshallObject(ice.getKey(), out, refMap);
marshallObject(ice.getValue(), out, refMap);
writeUnsignedLong(out, ice.getCreated());
- out.writeLong(ice.getLifespan()); // could be negative so should not use unsigned longs
+ marshallObject(ice.getLifespan(), out, refMap); // could be negative so should not use unsigned longs
writeUnsignedLong(out, ice.getLastUsed());
- out.writeLong(ice.getMaxIdle()); // could be negative so should not use unsigned longs
+ marshallObject(ice.getMaxIdle(), out, refMap); // could be negative so should not use unsigned longs
}
}
More information about the infinispan-commits
mailing list