本文整理汇总了C#中IceInternal.traceLevels方法的典型用法代码示例。如果您正苦于以下问题:C# IceInternal.traceLevels方法的具体用法?C# IceInternal.traceLevels怎么用?C# IceInternal.traceLevels使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IceInternal
的用法示例。
在下文中一共展示了IceInternal.traceLevels方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConnectionI
internal ConnectionI(Communicator communicator, IceInternal.Instance instance,
IceInternal.ConnectionReaper reaper, IceInternal.Transceiver transceiver,
IceInternal.Connector connector, IceInternal.EndpointI endpoint, ObjectAdapter adapter)
{
_communicator = communicator;
_instance = instance;
_reaper = reaper;
InitializationData initData = instance.initializationData();
_transceiver = transceiver;
_desc = transceiver.ToString();
_type = transceiver.type();
_connector = connector;
_endpoint = endpoint;
_adapter = adapter;
_dispatcher = initData.dispatcher; // Cached for better performance.
_logger = initData.logger; // Cached for better performance.
_traceLevels = instance.traceLevels(); // Cached for better performance.
_timer = instance.timer();
_writeTimeout = new TimeoutCallback(this);
_writeTimeoutScheduled = false;
_writeStreamPos = -1;
_readTimeout = new TimeoutCallback(this);
_readTimeoutScheduled = false;
_readStreamPos = -1;
_warn = initData.properties.getPropertyAsInt("Ice.Warn.Connections") > 0;
_warnUdp = initData.properties.getPropertyAsInt("Ice.Warn.Datagrams") > 0;
_cacheBuffers = initData.properties.getPropertyAsIntWithDefault("Ice.CacheMessageBuffers", 1) == 1;
_acmAbsoluteTimeoutMillis = 0;
_nextRequestId = 1;
_batchAutoFlush = initData.properties.getPropertyAsIntWithDefault("Ice.BatchAutoFlush", 1) > 0;
_batchStream = new IceInternal.BasicStream(instance, Util.currentProtocolEncoding, _batchAutoFlush);
_batchStreamInUse = false;
_batchRequestNum = 0;
_batchRequestCompress = false;
_batchMarker = 0;
_readStream = new IceInternal.BasicStream(instance, Util.currentProtocolEncoding);
_readHeader = false;
_writeStream = new IceInternal.BasicStream(instance, Util.currentProtocolEncoding);
_dispatchCount = 0;
_state = StateNotInitialized;
_compressionLevel = initData.properties.getPropertyAsIntWithDefault("Ice.Compression.Level", 1);
if(_compressionLevel < 1)
{
_compressionLevel = 1;
}
else if(_compressionLevel > 9)
{
_compressionLevel = 9;
}
ObjectAdapterI adapterImpl = _adapter as ObjectAdapterI;
if(adapterImpl != null)
{
_servantManager = adapterImpl.getServantManager();
}
try
{
if(_endpoint.datagram())
{
_acmTimeout = 0;
}
else
{
if(adapterImpl != null)
{
_acmTimeout = adapterImpl.getACM();
}
else
{
_acmTimeout = _instance.clientACM();
}
}
if(adapterImpl != null)
{
_threadPool = adapterImpl.getThreadPool();
}
else
{
_threadPool = instance.clientThreadPool();
}
_threadPool.initialize(this);
}
catch(LocalException)
{
throw;
}
catch(System.Exception ex)
{
throw new SyscallException(ex);
}
}
示例2: ConnectionI
internal ConnectionI(Communicator communicator, IceInternal.Instance instance,
IceInternal.ACMMonitor monitor, IceInternal.Transceiver transceiver,
IceInternal.Connector connector, IceInternal.EndpointI endpoint, ObjectAdapterI adapter)
{
_communicator = communicator;
_instance = instance;
_monitor = monitor;
_transceiver = transceiver;
_desc = transceiver.ToString();
_type = transceiver.protocol();
_connector = connector;
_endpoint = endpoint;
_adapter = adapter;
InitializationData initData = instance.initializationData();
_logger = initData.logger; // Cached for better performance.
_traceLevels = instance.traceLevels(); // Cached for better performance.
_timer = instance.timer();
_writeTimeout = new TimeoutCallback(this);
_writeTimeoutScheduled = false;
_readTimeout = new TimeoutCallback(this);
_readTimeoutScheduled = false;
_warn = initData.properties.getPropertyAsInt("Ice.Warn.Connections") > 0;
_warnUdp = initData.properties.getPropertyAsInt("Ice.Warn.Datagrams") > 0;
_cacheBuffers = instance.cacheMessageBuffers() > 0;
if(_monitor != null && _monitor.getACM().timeout > 0)
{
_acmLastActivity = IceInternal.Time.currentMonotonicTimeMillis();
}
else
{
_acmLastActivity = -1;
}
_nextRequestId = 1;
_messageSizeMax = adapter != null ? adapter.messageSizeMax() : instance.messageSizeMax();
_batchRequestQueue = new IceInternal.BatchRequestQueue(instance, _endpoint.datagram());
_readStream = new IceInternal.BasicStream(instance, Util.currentProtocolEncoding);
_readHeader = false;
_readStreamPos = -1;
_writeStream = new IceInternal.BasicStream(instance, Util.currentProtocolEncoding);
_writeStreamPos = -1;
_dispatchCount = 0;
_state = StateNotInitialized;
_compressionLevel = initData.properties.getPropertyAsIntWithDefault("Ice.Compression.Level", 1);
if(_compressionLevel < 1)
{
_compressionLevel = 1;
}
else if(_compressionLevel > 9)
{
_compressionLevel = 9;
}
if(adapter != null)
{
_servantManager = adapter.getServantManager();
}
try
{
if(adapter != null)
{
_threadPool = adapter.getThreadPool();
}
else
{
_threadPool = instance.clientThreadPool();
}
_threadPool.initialize(this);
}
catch(LocalException)
{
throw;
}
catch(System.Exception ex)
{
throw new SyscallException(ex);
}
}
示例3: ObjectAdapterI
//.........这里部分代码省略.........
//
// Make sure this router is not already registered with another adapter.
//
if(_routerInfo.getAdapter() != null)
{
Ice.AlreadyRegisteredException ex = new Ice.AlreadyRegisteredException();
ex.kindOfObject = "object adapter with router";
ex.id = instance_.identityToString(router.ice_getIdentity());
throw ex;
}
//
// Add the router's server proxy endpoints to this object
// adapter.
//
IceInternal.EndpointI[] endpoints = _routerInfo.getServerEndpoints();
for(int i = 0; i < endpoints.Length; ++i)
{
_routerEndpoints.Add(endpoints[i]);
}
_routerEndpoints.Sort(); // Must be sorted.
//
// Remove duplicate endpoints, so we have a list of unique endpoints.
//
for(int i = 0; i < _routerEndpoints.Count-1;)
{
IceInternal.EndpointI e1 = _routerEndpoints[i];
IceInternal.EndpointI e2 = _routerEndpoints[i + 1];
if(e1.Equals(e2))
{
_routerEndpoints.RemoveAt(i);
}
else
{
++i;
}
}
//
// Associate this object adapter with the router. This way,
// new outgoing connections to the router's client proxy will
// use this object adapter for callbacks.
//
_routerInfo.setAdapter(this);
//
// Also modify all existing outgoing connections to the
// router's client proxy to use this object adapter for
// callbacks.
//
instance_.outgoingConnectionFactory().setRouterInfo(_routerInfo);
}
}
else
{
//
// Parse the endpoints, but don't store them in the adapter. The connection
// factory might change it, for example, to fill in the real port number.
//
List<IceInternal.EndpointI> endpoints =
parseEndpoints(properties.getProperty(_name + ".Endpoints"), true);
foreach(IceInternal.EndpointI endp in endpoints)
{
IceInternal.IncomingConnectionFactory factory =
new IceInternal.IncomingConnectionFactory(instance, endp, this, _name);
_incomingConnectionFactories.Add(factory);
}
if(endpoints.Count == 0)
{
IceInternal.TraceLevels tl = instance_.traceLevels();
if(tl.network >= 2)
{
instance_.initializationData().logger.trace(tl.networkCat, "created adapter `" + _name +
"' without endpoints");
}
}
//
// Parse published endpoints.
//
_publishedEndpoints = parsePublishedEndpoints();
}
if(properties.getProperty(_name + ".Locator").Length > 0)
{
setLocator(LocatorPrxHelper.uncheckedCast(
instance_.proxyFactory().propertyToProxy(_name + ".Locator")));
}
else
{
setLocator(instance_.referenceFactory().getDefaultLocator());
}
}
catch(LocalException)
{
destroy();
throw;
}
}