[jbosscache-commits] JBoss Cache SVN: r5624 - in core/trunk/src: main/java/org/jboss/cache/marshall and 1 other directories.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Tue Apr 22 12:21:02 EDT 2008
Author: manik.surtani at jboss.com
Date: 2008-04-22 12:21:02 -0400 (Tue, 22 Apr 2008)
New Revision: 5624
Modified:
core/trunk/src/main/java/org/jboss/cache/StringFqn.java
core/trunk/src/main/java/org/jboss/cache/marshall/NodeData.java
core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java
Log:
Optimised Fqns for String representation
Modified: core/trunk/src/main/java/org/jboss/cache/StringFqn.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/StringFqn.java 2008-04-22 16:09:06 UTC (rev 5623)
+++ core/trunk/src/main/java/org/jboss/cache/StringFqn.java 2008-04-22 16:21:02 UTC (rev 5624)
@@ -18,7 +18,9 @@
// TODO: Implement proper String escaping.
public class StringFqn extends Fqn
{
- protected StringFqn()
+ // Needs to be public because of NodeData serialization.
+ // TODO: Remove in 3.0.0 once we refactor NodeData to go through a cache marshaller instead of it's current serialization.
+ public StringFqn()
{
super(true);
stringRepresentation = SEPARATOR;
Modified: core/trunk/src/main/java/org/jboss/cache/marshall/NodeData.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/marshall/NodeData.java 2008-04-22 16:09:06 UTC (rev 5623)
+++ core/trunk/src/main/java/org/jboss/cache/marshall/NodeData.java 2008-04-22 16:21:02 UTC (rev 5624)
@@ -14,6 +14,7 @@
* @author Bela Ban
* @version $Id$
*/
+// TODO: In 3.0.0, remove Externalizable and rely on the CacheMarshaller.
public class NodeData implements Externalizable
{
private Fqn<?> fqn = null;
@@ -62,6 +63,7 @@
return false;
}
+ // TODO: Remove in 3.0.0 and replace with marshallNodeData/unmarshallNodeData methods in the CacheMarshaller so that we can use the same marshalling framework for Fqns.
public void writeExternal(ObjectOutput out) throws IOException
{
out.writeObject(fqn);
@@ -76,6 +78,7 @@
}
}
+ // TODO: Remove in 3.0.0 and replace with marshallNodeData/unmarshallNodeData methods in the CacheMarshaller so that we can use the same marshalling framework for Fqns.
@SuppressWarnings("unchecked")
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
Modified: core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java 2008-04-22 16:09:06 UTC (rev 5623)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/VersionAwareMarshallerTest.java 2008-04-22 16:21:02 UTC (rev 5624)
@@ -41,7 +41,7 @@
public void testMarshallerSelection()
{
VersionAwareMarshaller marshaller = createVAMandRestartCache("2.2.0.GA");
- assertEquals(CacheMarshaller210.class, marshaller.defaultMarshaller.getClass());
+ assertEquals(CacheMarshaller220.class, marshaller.defaultMarshaller.getClass());
marshaller = createVAMandRestartCache("2.1.0.GA");
assertEquals(CacheMarshaller210.class, marshaller.defaultMarshaller.getClass());
More information about the jbosscache-commits
mailing list