cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r758979 - in /incubator/cassandra/trunk/src/org/apache/cassandra/db: Row.java SuperColumn.java
Date Fri, 27 Mar 2009 02:19:46 GMT
Author: jbellis
Date: Fri Mar 27 02:19:45 2009
New Revision: 758979

URL: http://svn.apache.org/viewvc?rev=758979&view=rev
Log:
expose concrete serializer

Modified:
    incubator/cassandra/trunk/src/org/apache/cassandra/db/Row.java
    incubator/cassandra/trunk/src/org/apache/cassandra/db/SuperColumn.java

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/Row.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/Row.java?rev=758979&r1=758978&r2=758979&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/Row.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/Row.java Fri Mar 27 02:19:45 2009
@@ -36,20 +36,16 @@
 
 public class Row
 {
-    private static ICompactSerializer<Row> serializer_;
+    private static RowSerializer serializer_ = new RowSerializer();
     private static Logger logger_ = Logger.getLogger(Row.class);
 
-    static
-    {
-        serializer_ = new RowSerializer();
-    }
-
-    static ICompactSerializer<Row> serializer()
+    static RowSerializer serializer()
     {
         return serializer_;
     }
 
     private String key_;
+
     private Map<String, ColumnFamily> columnFamilies_ = new Hashtable<String, ColumnFamily>();
 
     protected Row()

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/SuperColumn.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/SuperColumn.java?rev=758979&r1=758978&r2=758979&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/SuperColumn.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/SuperColumn.java Fri Mar 27 02:19:45
2009
@@ -39,15 +39,10 @@
 public final class SuperColumn implements IColumn, Serializable
 {
 	private static Logger logger_ = Logger.getLogger(SuperColumn.class);
-	private static ICompactSerializer2<IColumn> serializer_;
+	private static SuperColumnSerializer serializer_ = new SuperColumnSerializer();
 	private final static String seperator_ = ":";
 
-    static
-    {
-        serializer_ = new SuperColumnSerializer();
-    }
-
-    static ICompactSerializer2<IColumn> serializer()
+    static SuperColumnSerializer serializer()
     {
         return serializer_;
     }
@@ -173,6 +168,7 @@
     public byte[] value(String key)
     {
     	IColumn column = columns_.get(key);
+    	assert column instanceof Column;
     	if ( column != null )
     		return column.value();
     	throw new IllegalArgumentException("Value was requested for a column that does not exist.");



Mime
View raw message