cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r1069037 - in /cassandra/trunk/src/java/org/apache/cassandra: db/ gms/ net/ service/ streaming/
Date Wed, 09 Feb 2011 19:11:28 GMT
Author: gdusbabek
Date: Wed Feb  9 19:11:27 2011
New Revision: 1069037

URL: http://svn.apache.org/viewvc?rev=1069037&view=rev
Log:
MessageProducer int to Integer. patch by gdusbabek, reviewed by jbellis. CASSANDRA-2140

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/db/IndexScanCommand.java
    cassandra/trunk/src/java/org/apache/cassandra/db/RangeSliceCommand.java
    cassandra/trunk/src/java/org/apache/cassandra/db/ReadCommand.java
    cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java
    cassandra/trunk/src/java/org/apache/cassandra/db/Truncation.java
    cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java
    cassandra/trunk/src/java/org/apache/cassandra/net/CachingMessageProducer.java
    cassandra/trunk/src/java/org/apache/cassandra/net/MessageProducer.java
    cassandra/trunk/src/java/org/apache/cassandra/service/MigrationManager.java
    cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamReply.java
    cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamRequestMessage.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/IndexScanCommand.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/IndexScanCommand.java?rev=1069037&r1=1069036&r2=1069037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/IndexScanCommand.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/IndexScanCommand.java Wed Feb  9 19:11:27
2011
@@ -55,7 +55,7 @@ public class IndexScanCommand implements
         this.range = range;
     }
 
-    public Message getMessage(int version)
+    public Message getMessage(Integer version)
     {
         DataOutputBuffer dob = new DataOutputBuffer();
         try

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/RangeSliceCommand.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/RangeSliceCommand.java?rev=1069037&r1=1069036&r2=1069037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/RangeSliceCommand.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/RangeSliceCommand.java Wed Feb  9 19:11:27
2011
@@ -86,7 +86,7 @@ public class RangeSliceCommand implement
         this.max_keys = max_keys;
     }
 
-    public Message getMessage(int version) throws IOException
+    public Message getMessage(Integer version) throws IOException
     {
         DataOutputBuffer dob = new DataOutputBuffer();
         serializer.serialize(this, dob, version);

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/ReadCommand.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/ReadCommand.java?rev=1069037&r1=1069036&r2=1069037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/ReadCommand.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/ReadCommand.java Wed Feb  9 19:11:27
2011
@@ -47,7 +47,7 @@ public abstract class ReadCommand implem
         return serializer;
     }
 
-    public Message getMessage(int version) throws IOException
+    public Message getMessage(Integer version) throws IOException
     {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         DataOutputStream dos = new DataOutputStream(bos);

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java?rev=1069037&r1=1069036&r2=1069037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java Wed Feb  9 19:11:27
2011
@@ -19,7 +19,6 @@
 package org.apache.cassandra.db;
 
 import java.io.*;
-import java.net.InetAddress;
 import java.nio.ByteBuffer;
 import java.util.*;
 import java.util.concurrent.ExecutionException;
@@ -30,8 +29,6 @@ import org.apache.commons.lang.StringUti
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.db.filter.QueryPath;
-import org.apache.cassandra.db.marshal.AbstractCommutativeType;
-import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.io.ICompactSerializer;
 import org.apache.cassandra.net.Message;
 import org.apache.cassandra.service.StorageService;
@@ -206,7 +203,7 @@ public class RowMutation implements IMut
         Table.open(table_).load(this);
     }
 
-    public Message getMessage(int version) throws IOException
+    public Message getMessage(Integer version) throws IOException
     {
         return makeRowMutationMessage(StorageService.Verb.MUTATION, version);
     }

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/Truncation.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/Truncation.java?rev=1069037&r1=1069036&r2=1069037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/Truncation.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/Truncation.java Wed Feb  9 19:11:27 2011
@@ -67,7 +67,7 @@ public class Truncation implements Messa
         Table.open(keyspace).getColumnFamilyStore(columnFamily).truncate();
     }
 
-    public Message getMessage(int version) throws IOException
+    public Message getMessage(Integer version) throws IOException
     {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         DataOutputStream dos = new DataOutputStream(bos);

Modified: cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java?rev=1069037&r1=1069036&r2=1069037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java Wed Feb  9 19:11:27 2011
@@ -113,7 +113,7 @@ public class Gossiper implements IFailur
                 {
                     MessageProducer prod = new MessageProducer()
                     {
-                        public Message getMessage(int version) throws IOException
+                        public Message getMessage(Integer version) throws IOException
                         {
                             return makeGossipDigestSynMessage(gDigests, version);
                         }

Modified: cassandra/trunk/src/java/org/apache/cassandra/net/CachingMessageProducer.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/net/CachingMessageProducer.java?rev=1069037&r1=1069036&r2=1069037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/net/CachingMessageProducer.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/net/CachingMessageProducer.java Wed Feb
 9 19:11:27 2011
@@ -7,14 +7,14 @@ import java.util.Map;
 public class CachingMessageProducer implements MessageProducer
 {
     private final MessageProducer prod;
-    private final Map<Integer, Message> messages = new HashMap<Integer, Message>();
+    private final Map<Integer, Message> messages = new HashMap<Integer, Message>(2);
 
     public CachingMessageProducer(MessageProducer prod)
     {
         this.prod = prod;    
     }
 
-    public synchronized Message getMessage(int version) throws IOException
+    public synchronized Message getMessage(Integer version) throws IOException
     {
         Message msg = messages.get(version);
         if (msg == null)

Modified: cassandra/trunk/src/java/org/apache/cassandra/net/MessageProducer.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/net/MessageProducer.java?rev=1069037&r1=1069036&r2=1069037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/net/MessageProducer.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/net/MessageProducer.java Wed Feb  9 19:11:27
2011
@@ -4,5 +4,5 @@ import java.io.IOException;
 
 public interface MessageProducer
 {
-    public Message getMessage(int version) throws IOException;
+    public Message getMessage(Integer version) throws IOException;
 }

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/MigrationManager.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/MigrationManager.java?rev=1069037&r1=1069036&r2=1069037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/MigrationManager.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/MigrationManager.java Wed Feb  9
19:11:27 2011
@@ -95,7 +95,7 @@ public class MigrationManager implements
     public static void announce(final UUID version, Set<InetAddress> hosts)
     {
         MessageProducer prod = new CachingMessageProducer(new MessageProducer() {
-            public Message getMessage(int protocolVersion) throws IOException
+            public Message getMessage(Integer protocolVersion) throws IOException
             {
                 return makeVersionMessage(version, protocolVersion);
             }

Modified: cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamReply.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamReply.java?rev=1069037&r1=1069036&r2=1069037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamReply.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamReply.java Wed Feb  9 19:11:27
2011
@@ -54,7 +54,7 @@ class StreamReply implements MessageProd
         this.sessionId = sessionId;
     }
 
-    public Message getMessage(int version) throws IOException
+    public Message getMessage(Integer version) throws IOException
     {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         DataOutputStream dos = new DataOutputStream( bos );

Modified: cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamRequestMessage.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamRequestMessage.java?rev=1069037&r1=1069036&r2=1069037&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamRequestMessage.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamRequestMessage.java Wed
Feb  9 19:11:27 2011
@@ -88,7 +88,7 @@ class StreamRequestMessage implements Me
         table = null;
     }
     
-    public Message getMessage(int version)
+    public Message getMessage(Integer version)
     {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         DataOutputStream dos = new DataOutputStream(bos);



Mime
View raw message