activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r782714 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State: ConnectionState.cs ConnectionStateTracker.cs SessionState.cs SynchronizedObjects.cs
Date Mon, 08 Jun 2009 17:55:02 GMT
Author: jgomes
Date: Mon Jun  8 17:55:01 2009
New Revision: 782714

URL: http://svn.apache.org/viewvc?rev=782714&view=rev
Log:
Renamed the following classes to avoid naming collisions and confusion with standard .NET
classes:

SynchronizedCollection to AtomicCollection.
SynchronizedDictionary to AtomicDictionary.

These naming conventions are more inline with existing NMS naming conventions.
Fixes [AMQNET-152]. (See https://issues.apache.org/activemq/browse/AMQNET-152)

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionState.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionStateTracker.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SessionState.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SynchronizedObjects.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionState.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionState.cs?rev=782714&r1=782713&r2=782714&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionState.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionState.cs
Mon Jun  8 17:55:01 2009
@@ -25,9 +25,9 @@
 	{
 
 		ConnectionInfo info;
-		private SynchronizedDictionary<TransactionId, TransactionState> transactions = new
SynchronizedDictionary<TransactionId, TransactionState>();
-		private SynchronizedDictionary<SessionId, SessionState> sessions = new SynchronizedDictionary<SessionId,
SessionState>();
-		private SynchronizedCollection<DestinationInfo> tempDestinations = new SynchronizedCollection<DestinationInfo>();
+		private AtomicDictionary<TransactionId, TransactionState> transactions = new AtomicDictionary<TransactionId,
TransactionState>();
+		private AtomicDictionary<SessionId, SessionState> sessions = new AtomicDictionary<SessionId,
SessionState>();
+		private AtomicCollection<DestinationInfo> tempDestinations = new AtomicCollection<DestinationInfo>();
 		private AtomicBoolean _shutdown = new AtomicBoolean(false);
 
 		public ConnectionState(ConnectionInfo info)
@@ -98,7 +98,7 @@
 			}
 		}
 
-		public SynchronizedCollection<TransactionState> TransactionStates
+		public AtomicCollection<TransactionState> TransactionStates
 		{
 			get
 			{
@@ -161,7 +161,7 @@
 			}
 		}
 
-		public SynchronizedCollection<SessionId> SessionIds
+		public AtomicCollection<SessionId> SessionIds
 		{
 			get
 			{
@@ -169,7 +169,7 @@
 			}
 		}
 
-		public SynchronizedCollection<DestinationInfo> TempDestinations
+		public AtomicCollection<DestinationInfo> TempDestinations
 		{
 			get
 			{
@@ -177,7 +177,7 @@
 			}
 		}
 
-		public SynchronizedCollection<SessionState> SessionStates
+		public AtomicCollection<SessionState> SessionStates
 		{
 			get
 			{

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionStateTracker.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionStateTracker.cs?rev=782714&r1=782713&r2=782714&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionStateTracker.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ConnectionStateTracker.cs
Mon Jun  8 17:55:01 2009
@@ -136,7 +136,7 @@
 
 		private void DoRestoreTransactions(ITransport transport, ConnectionState connectionState)
 		{
-			SynchronizedCollection<TransactionState> transactionStates = connectionState.TransactionStates;
+			AtomicCollection<TransactionState> transactionStates = connectionState.TransactionStates;
 			foreach(TransactionState transactionState in transactionStates)
 			{
 				foreach(Command command in transactionState.Commands)

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SessionState.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SessionState.cs?rev=782714&r1=782713&r2=782714&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SessionState.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SessionState.cs
Mon Jun  8 17:55:01 2009
@@ -25,8 +25,8 @@
 	{
 		SessionInfo info;
 
-		private SynchronizedDictionary<ProducerId, ProducerState> producers = new SynchronizedDictionary<ProducerId,
ProducerState>();
-		private SynchronizedDictionary<ConsumerId, ConsumerState> consumers = new SynchronizedDictionary<ConsumerId,
ConsumerState>();
+		private AtomicDictionary<ProducerId, ProducerState> producers = new AtomicDictionary<ProducerId,
ProducerState>();
+		private AtomicDictionary<ConsumerId, ConsumerState> consumers = new AtomicDictionary<ConsumerId,
ConsumerState>();
 		private AtomicBoolean _shutdown = new AtomicBoolean(false);
 
 		public SessionState(SessionInfo info)
@@ -73,7 +73,7 @@
 			}
 		}
 
-		public SynchronizedCollection<ConsumerId> ConsumerIds
+		public AtomicCollection<ConsumerId> ConsumerIds
 		{
 			get
 			{
@@ -81,7 +81,7 @@
 			}
 		}
 
-		public SynchronizedCollection<ProducerId> ProducerIds
+		public AtomicCollection<ProducerId> ProducerIds
 		{
 			get
 			{
@@ -89,7 +89,7 @@
 			}
 		}
 
-		public SynchronizedCollection<ProducerState> ProducerStates
+		public AtomicCollection<ProducerState> ProducerStates
 		{
 			get
 			{
@@ -110,7 +110,7 @@
 			}
 		}
 
-		public SynchronizedCollection<ConsumerState> ConsumerStates
+		public AtomicCollection<ConsumerState> ConsumerStates
 		{
 			get
 			{

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SynchronizedObjects.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SynchronizedObjects.cs?rev=782714&r1=782713&r2=782714&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SynchronizedObjects.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SynchronizedObjects.cs
Mon Jun  8 17:55:01 2009
@@ -21,18 +21,18 @@
 
 namespace Apache.NMS.ActiveMQ.State
 {
-	public class SynchronizedCollection<TValue>
+	public class AtomicCollection<TValue>
 		where TValue : class
 	{
 		private Object myLock = new Object();
 		private ArrayList _collection;
 
-		public SynchronizedCollection()
+		public AtomicCollection()
 		{
 			_collection = new ArrayList();
 		}
 
-		public SynchronizedCollection(ICollection c)
+		public AtomicCollection(ICollection c)
 		{
 			_collection = new ArrayList(c);
 		}
@@ -143,7 +143,7 @@
 #endif
 	}
 
-	public class SynchronizedDictionary<TKey, TValue>
+	public class AtomicDictionary<TKey, TValue>
 		where TKey : class
 		where TValue : class
 	{
@@ -175,24 +175,24 @@
 			}
 		}
 
-		public SynchronizedCollection<TKey> Keys
+		public AtomicCollection<TKey> Keys
 		{
 			get
 			{
 				lock(myLock)
 				{
-					return new SynchronizedCollection<TKey>(_dictionary.Keys);
+					return new AtomicCollection<TKey>(_dictionary.Keys);
 				}
 			}
 		}
 
-		public SynchronizedCollection<TValue> Values
+		public AtomicCollection<TValue> Values
 		{
 			get
 			{
 				lock(myLock)
 				{
-					return new SynchronizedCollection<TValue>(_dictionary.Values);
+					return new AtomicCollection<TValue>(_dictionary.Values);
 				}
 			}
 		}



Mime
View raw message