summaryrefslogtreecommitdiff
path: root/csharp/src/Ice/ObjectAdapterI.cs
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-11-10 14:07:23 -0500
committerBernard Normier <bernard@zeroc.com>2016-11-10 14:07:23 -0500
commit4e06be13bf710ec95f5d207c59b90a0584b857b4 (patch)
tree5bff3948e1c2db2809ac03ef8f4aa8ba14d03c3f /csharp/src/Ice/ObjectAdapterI.cs
parentVisual Studio settings for C++/C# languages (diff)
downloadice-4e06be13bf710ec95f5d207c59b90a0584b857b4.tar.bz2
ice-4e06be13bf710ec95f5d207c59b90a0584b857b4.tar.xz
ice-4e06be13bf710ec95f5d207c59b90a0584b857b4.zip
Replaced all double-underscores in C#
Diffstat (limited to 'csharp/src/Ice/ObjectAdapterI.cs')
-rw-r--r--csharp/src/Ice/ObjectAdapterI.cs140
1 files changed, 70 insertions, 70 deletions
diff --git a/csharp/src/Ice/ObjectAdapterI.cs b/csharp/src/Ice/ObjectAdapterI.cs
index a1213d9ae99..da1cb5df9ea 100644
--- a/csharp/src/Ice/ObjectAdapterI.cs
+++ b/csharp/src/Ice/ObjectAdapterI.cs
@@ -45,7 +45,7 @@ namespace Ice
// If we've previously been initialized we just need to activate the
// incoming connection factories and we're done.
//
- if(state_ != StateUninitialized)
+ if(_state != StateUninitialized)
{
foreach(IncomingConnectionFactory icf in _incomingConnectionFactories)
{
@@ -61,12 +61,12 @@ namespace Ice
// deactivation from other threads while these one off
// initializations are done.
//
- state_ = StateActivating;
+ _state = StateActivating;
locatorInfo = _locatorInfo;
if(!_noConfig)
{
- Properties properties = instance_.initializationData().properties;
+ Properties properties = _instance.initializationData().properties;
printAdapterReady = properties.getPropertyAsInt("Ice.PrintAdapterReady") > 0;
}
}
@@ -87,7 +87,7 @@ namespace Ice
//
lock(this)
{
- state_ = StateUninitialized;
+ _state = StateUninitialized;
System.Threading.Monitor.PulseAll(this);
}
throw;
@@ -100,14 +100,14 @@ namespace Ice
lock(this)
{
- Debug.Assert(state_ == StateActivating);
+ Debug.Assert(_state == StateActivating);
foreach(IncomingConnectionFactory icf in _incomingConnectionFactories)
{
icf.activate();
}
- state_ = StateActive;
+ _state = StateActive;
System.Threading.Monitor.PulseAll(this);
}
}
@@ -117,7 +117,7 @@ namespace Ice
lock(this)
{
checkForDeactivation();
- state_ = StateHeld;
+ _state = StateHeld;
foreach(IncomingConnectionFactory factory in _incomingConnectionFactories)
{
factory.hold();
@@ -150,15 +150,15 @@ namespace Ice
// Wait for activation to complete. This is necessary to not
// get out of order locator updates.
//
- while(state_ == StateActivating || state_ == StateDeactivating)
+ while(_state == StateActivating || _state == StateDeactivating)
{
System.Threading.Monitor.Wait(this);
}
- if(state_ > StateDeactivating)
+ if(_state > StateDeactivating)
{
return;
}
- state_ = StateDeactivating;
+ _state = StateDeactivating;
}
//
@@ -171,7 +171,7 @@ namespace Ice
//
// Remove entry from the router manager.
//
- instance_.routerManager().erase(_routerInfo.getRouter());
+ _instance.routerManager().erase(_routerInfo.getRouter());
//
// Clear this object adapter with the router.
@@ -206,12 +206,12 @@ namespace Ice
// changing the object adapter might block if there are still
// requests being dispatched.
//
- instance_.outgoingConnectionFactory().removeAdapter(this);
+ _instance.outgoingConnectionFactory().removeAdapter(this);
lock(this)
{
- Debug.Assert(state_ == StateDeactivating);
- state_ = StateDeactivated;
+ Debug.Assert(_state == StateDeactivating);
+ _state = StateDeactivated;
System.Threading.Monitor.PulseAll(this);
}
}
@@ -226,11 +226,11 @@ namespace Ice
// for the return of all direct method calls using this
// adapter.
//
- while((state_ < StateDeactivated) || _directCount > 0)
+ while((_state < StateDeactivated) || _directCount > 0)
{
System.Threading.Monitor.Wait(this);
}
- if(state_ > StateDeactivated)
+ if(_state > StateDeactivated)
{
return;
}
@@ -252,7 +252,7 @@ namespace Ice
{
lock(this)
{
- return state_ >= StateDeactivated;
+ return _state >= StateDeactivated;
}
}
@@ -271,15 +271,15 @@ namespace Ice
// adapter. Other threads wait for the destruction to be
// completed.
//
- while(state_ == StateDestroying)
+ while(_state == StateDestroying)
{
System.Threading.Monitor.Wait(this);
}
- if(state_ == StateDestroyed)
+ if(_state == StateDestroyed)
{
return;
}
- state_ = StateDestroying;
+ _state = StateDestroying;
}
//
@@ -313,7 +313,7 @@ namespace Ice
//
// Remove object references (some of them cyclic).
//
- instance_ = null;
+ _instance = null;
_threadPool = null;
_routerEndpoints = null;
_routerInfo = null;
@@ -322,7 +322,7 @@ namespace Ice
_reference = null;
_objectAdapterFactory = null;
- state_ = StateDestroyed;
+ _state = StateDestroyed;
System.Threading.Monitor.PulseAll(this);
}
}
@@ -450,7 +450,7 @@ namespace Ice
{
checkForDeactivation();
- Reference @ref = ((ObjectPrxHelperBase)proxy).reference__();
+ Reference @ref = ((ObjectPrxHelperBase)proxy).iceReference();
return findFacet(@ref.getIdentity(), @ref.getFacet());
}
}
@@ -534,7 +534,7 @@ namespace Ice
{
checkForDeactivation();
- _locatorInfo = instance_.locatorManager().get(locator);
+ _locatorInfo = _instance.locatorManager().get(locator);
}
}
@@ -617,7 +617,7 @@ namespace Ice
// it can be called for AMI invocations if the proxy has no delegate set yet.
//
- Reference r = ((ObjectPrxHelperBase)proxy).reference__();
+ Reference r = ((ObjectPrxHelperBase)proxy).iceReference();
if(r.isWellKnown())
{
//
@@ -748,7 +748,7 @@ namespace Ice
{
// Not check for deactivation here!
- Debug.Assert(instance_ != null); // Must not be called after destroy().
+ Debug.Assert(_instance != null); // Must not be called after destroy().
Debug.Assert(_directCount > 0);
if(--_directCount == 0)
@@ -760,13 +760,13 @@ namespace Ice
public ThreadPool getThreadPool()
{
- // No mutex lock necessary, _threadPool and instance_ are
+ // No mutex lock necessary, _threadPool and _instance are
// immutable after creation until they are removed in
// destroy().
// Not check for deactivation here!
- Debug.Assert(instance_ != null); // Must not be called after destroy().
+ Debug.Assert(_instance != null); // Must not be called after destroy().
if(_threadPool != null)
{
@@ -774,7 +774,7 @@ namespace Ice
}
else
{
- return instance_.serverThreadPool();
+ return _instance.serverThreadPool();
}
}
@@ -791,7 +791,7 @@ namespace Ice
{
// Not check for deactivation here!
- Debug.Assert(instance_ != null); // Must not be called after destroy().
+ Debug.Assert(_instance != null); // Must not be called after destroy().
return _acm;
}
@@ -808,7 +808,7 @@ namespace Ice
ObjectAdapterFactory objectAdapterFactory, string name,
RouterPrx router, bool noConfig)
{
- instance_ = instance;
+ _instance = instance;
_communicator = communicator;
_objectAdapterFactory = objectAdapterFactory;
_servantManager = new ServantManager(instance, name);
@@ -824,12 +824,12 @@ namespace Ice
{
_id = "";
_replicaGroupId = "";
- _reference = instance_.referenceFactory().create("dummy -t", "");
- _acm = instance_.serverACM();
+ _reference = _instance.referenceFactory().create("dummy -t", "");
+ _acm = _instance.serverACM();
return;
}
- Properties properties = instance_.initializationData().properties;
+ Properties properties = _instance.initializationData().properties;
List<string> unknownProps = new List<string>();
bool noProps = filterProperties(unknownProps);
@@ -846,7 +846,7 @@ namespace Ice
message.Append("\n ");
message.Append(s);
}
- instance_.initializationData().logger.warning(message.ToString());
+ _instance.initializationData().logger.warning(message.ToString());
}
//
@@ -857,8 +857,8 @@ namespace Ice
//
// These need to be set to prevent warnings/asserts in the destructor.
//
- state_ = StateDestroyed;
- instance_ = null;
+ _state = StateDestroyed;
+ _instance = null;
_incomingConnectionFactories = null;
InitializationException ex = new InitializationException();
@@ -876,7 +876,7 @@ namespace Ice
string proxyOptions = properties.getPropertyWithDefault(_name + ".ProxyOptions", "-t");
try
{
- _reference = instance_.referenceFactory().create("dummy " + proxyOptions, "");
+ _reference = _instance.referenceFactory().create("dummy " + proxyOptions, "");
}
catch(ProxyParseException)
{
@@ -885,7 +885,7 @@ namespace Ice
throw ex;
}
- _acm = new ACMConfig(properties, communicator.getLogger(), _name + ".ACM", instance_.serverACM());
+ _acm = new ACMConfig(properties, communicator.getLogger(), _name + ".ACM", _instance.serverACM());
{
int defaultMessageSizeMax = instance.messageSizeMax() / 1024;
@@ -906,17 +906,17 @@ namespace Ice
int threadPoolSizeMax = properties.getPropertyAsInt(_name + ".ThreadPool.SizeMax");
if(threadPoolSize > 0 || threadPoolSizeMax > 0)
{
- _threadPool = new ThreadPool(instance_, _name + ".ThreadPool", 0);
+ _threadPool = new ThreadPool(_instance, _name + ".ThreadPool", 0);
}
if(router == null)
{
router = RouterPrxHelper.uncheckedCast(
- instance_.proxyFactory().propertyToProxy(_name + ".Router"));
+ _instance.proxyFactory().propertyToProxy(_name + ".Router"));
}
if(router != null)
{
- _routerInfo = instance_.routerManager().get(router);
+ _routerInfo = _instance.routerManager().get(router);
if(_routerInfo != null)
{
//
@@ -926,7 +926,7 @@ namespace Ice
{
Ice.AlreadyRegisteredException ex = new Ice.AlreadyRegisteredException();
ex.kindOfObject = "object adapter with router";
- ex.id = Ice.Util.identityToString(router.ice_getIdentity(), instance_.toStringMode());
+ ex.id = Ice.Util.identityToString(router.ice_getIdentity(), _instance.toStringMode());
throw ex;
}
@@ -970,7 +970,7 @@ namespace Ice
// router's client proxy to use this object adapter for
// callbacks.
//
- instance_.outgoingConnectionFactory().setRouterInfo(_routerInfo);
+ _instance.outgoingConnectionFactory().setRouterInfo(_routerInfo);
}
}
else
@@ -987,10 +987,10 @@ namespace Ice
}
if(endpoints.Count == 0)
{
- TraceLevels tl = instance_.traceLevels();
+ TraceLevels tl = _instance.traceLevels();
if(tl.network >= 2)
{
- instance_.initializationData().logger.trace(tl.networkCat, "created adapter `" + _name +
+ _instance.initializationData().logger.trace(tl.networkCat, "created adapter `" + _name +
"' without endpoints");
}
}
@@ -1004,11 +1004,11 @@ namespace Ice
if(properties.getProperty(_name + ".Locator").Length > 0)
{
setLocator(LocatorPrxHelper.uncheckedCast(
- instance_.proxyFactory().propertyToProxy(_name + ".Locator")));
+ _instance.proxyFactory().propertyToProxy(_name + ".Locator")));
}
else
{
- setLocator(instance_.referenceFactory().getDefaultLocator());
+ setLocator(_instance.referenceFactory().getDefaultLocator());
}
}
catch(LocalException)
@@ -1062,8 +1062,8 @@ namespace Ice
//
// Create a reference and return a proxy for this reference.
//
- Reference reference = instance_.referenceFactory().create(ident, facet, _reference, endpoints);
- return instance_.proxyFactory().referenceToProxy(reference);
+ Reference reference = _instance.referenceFactory().create(ident, facet, _reference, endpoints);
+ return _instance.proxyFactory().referenceToProxy(reference);
}
private ObjectPrx newIndirectProxy(Identity ident, string facet, string id)
@@ -1072,13 +1072,13 @@ namespace Ice
// Create a reference with the adapter id and return a
// proxy for the reference.
//
- Reference reference = instance_.referenceFactory().create(ident, facet, _reference, id);
- return instance_.proxyFactory().referenceToProxy(reference);
+ Reference reference = _instance.referenceFactory().create(ident, facet, _reference, id);
+ return _instance.proxyFactory().referenceToProxy(reference);
}
private void checkForDeactivation()
{
- if(state_ >= StateDeactivating)
+ if(_state >= StateDeactivating)
{
ObjectAdapterDeactivatedException ex = new ObjectAdapterDeactivatedException();
ex.name = getName();
@@ -1172,7 +1172,7 @@ namespace Ice
}
string s = endpts.Substring(beg, (end) - (beg));
- EndpointI endp = instance_.endpointFactoryManager().create(s, oaEndpoints);
+ EndpointI endp = _instance.endpointFactoryManager().create(s, oaEndpoints);
if(endp == null)
{
Ice.EndpointParseException e2 = new Ice.EndpointParseException();
@@ -1193,7 +1193,7 @@ namespace Ice
// Parse published endpoints. If set, these are used in proxies
// instead of the connection factory endpoints.
//
- string endpts = instance_.initializationData().properties.getProperty(_name + ".PublishedEndpoints");
+ string endpts = _instance.initializationData().properties.getProperty(_name + ".PublishedEndpoints");
List<EndpointI> endpoints = parseEndpoints(endpts, false);
if(endpoints.Count == 0)
{
@@ -1208,7 +1208,7 @@ namespace Ice
}
}
- if(instance_.traceLevels().network >= 1 && endpoints.Count > 0)
+ if(_instance.traceLevels().network >= 1 && endpoints.Count > 0)
{
StringBuilder s = new StringBuilder("published endpoints for object adapter `");
s.Append(_name);
@@ -1223,7 +1223,7 @@ namespace Ice
s.Append(endpoint.ToString());
first = false;
}
- instance_.initializationData().logger.trace(instance_.traceLevels().networkCat, s.ToString());
+ _instance.initializationData().logger.trace(_instance.traceLevels().networkCat, s.ToString());
}
return endpoints;
}
@@ -1258,12 +1258,12 @@ namespace Ice
}
catch(AdapterNotFoundException)
{
- if(instance_.traceLevels().location >= 1)
+ if(_instance.traceLevels().location >= 1)
{
System.Text.StringBuilder s = new System.Text.StringBuilder();
s.Append("couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n");
s.Append("the object adapter is not known to the locator registry");
- instance_.initializationData().logger.trace(instance_.traceLevels().locationCat, s.ToString());
+ _instance.initializationData().logger.trace(_instance.traceLevels().locationCat, s.ToString());
}
NotRegisteredException ex1 = new NotRegisteredException();
@@ -1273,12 +1273,12 @@ namespace Ice
}
catch(InvalidReplicaGroupIdException)
{
- if(instance_.traceLevels().location >= 1)
+ if(_instance.traceLevels().location >= 1)
{
System.Text.StringBuilder s = new System.Text.StringBuilder();
s.Append("couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n");
s.Append("the replica group `" + _replicaGroupId + "' is not known to the locator registry");
- instance_.initializationData().logger.trace(instance_.traceLevels().locationCat, s.ToString());
+ _instance.initializationData().logger.trace(_instance.traceLevels().locationCat, s.ToString());
}
NotRegisteredException ex1 = new NotRegisteredException();
@@ -1288,12 +1288,12 @@ namespace Ice
}
catch(AdapterAlreadyActiveException)
{
- if(instance_.traceLevels().location >= 1)
+ if(_instance.traceLevels().location >= 1)
{
System.Text.StringBuilder s = new System.Text.StringBuilder();
s.Append("couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n");
s.Append("the object adapter endpoints are already set");
- instance_.initializationData().logger.trace(instance_.traceLevels().locationCat, s.ToString());
+ _instance.initializationData().logger.trace(_instance.traceLevels().locationCat, s.ToString());
}
ObjectAdapterIdInUseException ex1 = new ObjectAdapterIdInUseException();
@@ -1310,17 +1310,17 @@ namespace Ice
}
catch(LocalException e)
{
- if(instance_.traceLevels().location >= 1)
+ if(_instance.traceLevels().location >= 1)
{
System.Text.StringBuilder s = new System.Text.StringBuilder();
s.Append("couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n");
s.Append(e.ToString());
- instance_.initializationData().logger.trace(instance_.traceLevels().locationCat, s.ToString());
+ _instance.initializationData().logger.trace(_instance.traceLevels().locationCat, s.ToString());
}
throw; // TODO: Shall we raise a special exception instead of a non obvious local exception?
}
- if(instance_.traceLevels().location >= 1)
+ if(_instance.traceLevels().location >= 1)
{
System.Text.StringBuilder s = new System.Text.StringBuilder();
s.Append("updated object adapter `" + _id + "' endpoints with the locator registry\n");
@@ -1337,7 +1337,7 @@ namespace Ice
}
}
}
- instance_.initializationData().logger.trace(instance_.traceLevels().locationCat, s.ToString());
+ _instance.initializationData().logger.trace(_instance.traceLevels().locationCat, s.ToString());
}
}
@@ -1400,7 +1400,7 @@ namespace Ice
bool noProps = true;
Dictionary<string, string> props =
- instance_.initializationData().properties.getPropertiesForPrefix(prefix);
+ _instance.initializationData().properties.getPropertiesForPrefix(prefix);
foreach(String prop in props.Keys)
{
bool valid = false;
@@ -1432,8 +1432,8 @@ namespace Ice
private const int StateDestroying = 6;
private const int StateDestroyed = 7;
- private int state_ = StateUninitialized;
- private Instance instance_;
+ private int _state = StateUninitialized;
+ private Instance _instance;
private Communicator _communicator;
private ObjectAdapterFactory _objectAdapterFactory;
private ThreadPool _threadPool;