activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r991341 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp: Connection.cs MessageConsumer.cs MessageProducer.cs QueueBrowser.cs Session.cs SessionExecutor.cs
Date Tue, 31 Aug 2010 21:43:26 GMT
Author: tabish
Date: Tue Aug 31 21:43:26 2010
New Revision: 991341

URL: http://svn.apache.org/viewvc?rev=991341&view=rev
Log:
Tag fields that really need to be readonly as such.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageProducer.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/QueueBrowser.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/SessionExecutor.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs?rev=991341&r1=991340&r2=991341&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs Tue Aug
31 21:43:26 2010
@@ -49,7 +49,7 @@ namespace Apache.NMS.ActiveMQ
         private bool userSpecifiedClientID;
         private readonly Uri brokerUri;
         private ITransport transport;
-        private ConnectionInfo info;
+        private readonly ConnectionInfo info;
 		private TimeSpan requestTimeout; // from connection factory
         private BrokerInfo brokerInfo; // from broker
         private WireFormatInfo brokerWireFormatInfo; // from broker
@@ -69,7 +69,7 @@ namespace Apache.NMS.ActiveMQ
         private IRedeliveryPolicy redeliveryPolicy;
         private PrefetchPolicy prefetchPolicy = new PrefetchPolicy();
         private ICompressionPolicy compressionPolicy = new CompressionPolicy();
-        private IdGenerator clientIdGenerator;
+        private readonly IdGenerator clientIdGenerator;
         private volatile CountDownLatch transportInterruptionProcessingComplete;
         private readonly MessageTransformation messageTransformation;
 

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs?rev=991341&r1=991340&r2=991341&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
Tue Aug 31 21:43:26 2010
@@ -48,8 +48,8 @@ namespace Apache.NMS.ActiveMQ
 
 		private MessageAck pendingAck = null;
 
-		private Atomic<bool> started = new Atomic<bool>();
-		private Atomic<bool> deliveringAcks = new Atomic<bool>();
+		private readonly Atomic<bool> started = new Atomic<bool>();
+		private readonly Atomic<bool> deliveringAcks = new Atomic<bool>();
 
 		private int redeliveryTimeout = 500;
 		protected bool disposed = false;

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageProducer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageProducer.cs?rev=991341&r1=991340&r2=991341&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageProducer.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageProducer.cs
Tue Aug 31 21:43:26 2010
@@ -29,9 +29,9 @@ namespace Apache.NMS.ActiveMQ
 	public class MessageProducer : IMessageProducer
 	{
 		private Session session;
-		private MemoryUsage usage = null;
+		private readonly MemoryUsage usage = null;
+		private readonly object closedLock = new object();
 		private bool closed = false;
-		private object closedLock = new object();
 		private readonly ProducerInfo info;
 		private int producerSequenceId = 0;
 

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/QueueBrowser.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/QueueBrowser.cs?rev=991341&r1=991340&r2=991341&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/QueueBrowser.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/QueueBrowser.cs Tue
Aug 31 21:43:26 2010
@@ -39,8 +39,8 @@ namespace Apache.NMS.ActiveMQ
 		private readonly ConsumerId consumerId;
 		private readonly Atomic<bool> browseDone = new Atomic<bool>(true);
 		private readonly bool dispatchAsync;
-		private object semaphore = new object();
-		private object myLock = new object();
+		private readonly object semaphore = new object();
+		private readonly object myLock = new object();
 
 		internal QueueBrowser(Session session, ConsumerId consumerId, ActiveMQDestination destination,
string selector, bool dispatchAsync)
 		{

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs?rev=991341&r1=991340&r2=991341&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs Tue Aug
31 21:43:26 2010
@@ -37,8 +37,9 @@ namespace Apache.NMS.ActiveMQ
 		private readonly IDictionary consumers = Hashtable.Synchronized(new Hashtable());
 		private readonly IDictionary producers = Hashtable.Synchronized(new Hashtable());
 
-		private SessionExecutor executor;
-		private TransactionContext transactionContext;
+		private readonly SessionExecutor executor;
+		private readonly TransactionContext transactionContext;
+		
 		private Connection connection;
 
 		private bool dispatchAsync;

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/SessionExecutor.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/SessionExecutor.cs?rev=991341&r1=991340&r2=991341&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/SessionExecutor.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/SessionExecutor.cs
Tue Aug 31 21:43:26 2010
@@ -25,7 +25,7 @@ namespace Apache.NMS.ActiveMQ
 {
     public class SessionExecutor : Threads.Task
     {
-        private MessageDispatchChannel messageQueue = null;
+        private readonly MessageDispatchChannel messageQueue = null;
         private TaskRunner taskRunner = null;
 
         private Session session = null;



Mime
View raw message