getRequestHandler(Reference rf, Ice.ObjectPrxHelperBase proxy) { if(rf.getCollocationOptimized()) { Ice.ObjectAdapter adapter = _instance.objectAdapterFactory().findObjectAdapter(proxy); if(adapter != null) { return new CollocatedRequestHandler(rf, adapter); } } if(rf.getCacheConnection()) { lock(this) { RequestHandler handler; if(_handlers.TryGetValue(rf, out handler)) { return handler; } handler = new ConnectRequestHandler(rf, proxy); _handlers.Add(rf, handler); return handler; } } else { return new ConnectRequestHandler(rf, proxy); } }
removeRequestHandler(Reference rf, RequestHandler handler) { if(rf.getCacheConnection()) { lock(this) { ConnectRequestHandler h; if(_handlers.TryGetValue(rf, out h) && h == handler) { _handlers.Remove(rf); } } } }