diff options
Diffstat (limited to 'csharp/src/Ice/ObjectAdapterFactory.cs')
-rw-r--r-- | csharp/src/Ice/ObjectAdapterFactory.cs | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/csharp/src/Ice/ObjectAdapterFactory.cs b/csharp/src/Ice/ObjectAdapterFactory.cs index f1ed93c40a7..791e26f8b5d 100644 --- a/csharp/src/Ice/ObjectAdapterFactory.cs +++ b/csharp/src/Ice/ObjectAdapterFactory.cs @@ -9,10 +9,7 @@ namespace IceInternal { - - using System.Collections; using System.Collections.Generic; - using System.Diagnostics; public sealed class ObjectAdapterFactory { @@ -25,16 +22,16 @@ namespace IceInternal // Ignore shutdown requests if the object adapter factory has // already been shut down. // - if(instance_ == null) + if(_instance == null) { return; } adapters = new List<Ice.ObjectAdapterI>(_adapters); - - instance_ = null; + + _instance = null; _communicator = null; - + System.Threading.Monitor.PulseAll(this); } @@ -47,7 +44,7 @@ namespace IceInternal adapter.deactivate(); } } - + public void waitForShutdown() { List<Ice.ObjectAdapterI> adapters; @@ -56,11 +53,11 @@ namespace IceInternal // // First we wait for the shutdown of the factory itself. // - while(instance_ != null) + while(_instance != null) { System.Threading.Monitor.Wait(this); } - + adapters = new List<Ice.ObjectAdapterI>(_adapters); } @@ -77,7 +74,7 @@ namespace IceInternal { lock(this) { - return instance_ == null; + return _instance == null; } } @@ -113,13 +110,13 @@ namespace IceInternal { adapters = new List<Ice.ObjectAdapterI>(_adapters); } - + foreach(Ice.ObjectAdapterI adapter in adapters) { adapter.updateConnectionObservers(); } } - + public void updateThreadObservers() { @@ -128,27 +125,27 @@ namespace IceInternal { adapters = new List<Ice.ObjectAdapterI>(_adapters); } - + foreach(Ice.ObjectAdapterI adapter in adapters) { adapter.updateThreadObservers(); } } - + public Ice.ObjectAdapter createObjectAdapter(string name, Ice.RouterPrx router) { lock(this) { - if(instance_ == null) + if(_instance == null) { throw new Ice.CommunicatorDestroyedException(); } - + Ice.ObjectAdapterI adapter = null; if(name.Length == 0) { string uuid = System.Guid.NewGuid().ToString(); - adapter = new Ice.ObjectAdapterI(instance_, _communicator, this, uuid, null, true); + adapter = new Ice.ObjectAdapterI(_instance, _communicator, this, uuid, null, true); } else { @@ -159,27 +156,27 @@ namespace IceInternal ex.id = name; throw ex; } - adapter = new Ice.ObjectAdapterI(instance_, _communicator, this, name, router, false); + adapter = new Ice.ObjectAdapterI(_instance, _communicator, this, name, router, false); _adapterNamesInUse.Add(name); } _adapters.Add(adapter); return adapter; } } - + public Ice.ObjectAdapter findObjectAdapter(Ice.ObjectPrx proxy) { List<Ice.ObjectAdapterI> adapters; lock(this) { - if(instance_ == null) + if(_instance == null) { return null; } - + adapters = new List<Ice.ObjectAdapterI>(_adapters); } - + foreach(Ice.ObjectAdapterI adapter in adapters) { try @@ -202,7 +199,7 @@ namespace IceInternal { lock(this) { - if(instance_ == null) + if(_instance == null) { return; } @@ -212,7 +209,7 @@ namespace IceInternal } } - public void flushAsyncBatchRequests(CommunicatorFlushBatch outAsync) + public void flushAsyncBatchRequests(Ice.CompressBatch compressBatch, CommunicatorFlushBatchAsync outAsync) { List<Ice.ObjectAdapterI> adapters; lock(this) @@ -222,22 +219,22 @@ namespace IceInternal foreach(Ice.ObjectAdapterI adapter in adapters) { - adapter.flushAsyncBatchRequests(outAsync); + adapter.flushAsyncBatchRequests(compressBatch, outAsync); } } - + // // Only for use by Instance. // internal ObjectAdapterFactory(Instance instance, Ice.Communicator communicator) { - instance_ = instance; + _instance = instance; _communicator = communicator; _adapterNamesInUse = new HashSet<string>(); _adapters = new List<Ice.ObjectAdapterI>(); } - - private Instance instance_; + + private Instance _instance; private Ice.Communicator _communicator; private HashSet<string> _adapterNamesInUse; private List<Ice.ObjectAdapterI> _adapters; |