internal StateTxfrCorresponder(ClusterCacheBase parent, DistributionManager distMgr, Address requestingNode, byte transferType) { _parent = parent; _distMgr = distMgr; _clientNode = requestingNode; _transferType = transferType; }
internal StateTxfrCorresponder(ClusterCacheBase parent, DistributionManager distMgr, Address requestingNode, byte transferType) { _parent = parent; _distMgr = distMgr; _clientNode = requestingNode; _transferType = parent.IsStartedAsMirror && transferType == StateTransferType.REPLICATE_DATA ? StateTransferType.MOVE_DATA : transferType; _transferTypeChanged = parent.IsStartedAsMirror && transferType == StateTransferType.REPLICATE_DATA; stream = new MemoryStream((int)_threshold); }
/// <summary> /// Method that allows the object to initialize itself. Passes the property map down /// the object hierarchy so that other objects may configure themselves as well.. /// </summary> /// <param name="cacheSchemes">collection of cache schemes (config properties).</param> /// <param name="properties">properties collection for this cache.</param> public override void Initialize(IDictionary cacheClasses, IDictionary properties, bool twoPhaseInitialization) { if (properties == null) throw new ArgumentNullException("properties"); try { base.Initialize(cacheClasses, properties); IDictionary frontCacheProps = ConfigHelper.GetCacheScheme(cacheClasses, properties, "internal-cache"); string cacheType = Convert.ToString(frontCacheProps["type"]).ToLower(); if (cacheType.CompareTo("local-cache") == 0) { _internalCache = CacheBase.Synchronized(new HashedLocalCache(cacheClasses, this, frontCacheProps, this, _context, false)); } else { throw new ConfigurationException("invalid or non-local class specified in partitioned cache"); } if (properties.Contains("data-affinity")) { _dataAffinity = (IDictionary) properties["data-affinity"]; } _distributionMgr = new DistributionManager(_autoBalancingThreshold, _internalCache.MaxSize); _distributionMgr.NCacheLog = Context.NCacheLog; InternalCache.BucketSize = _distributionMgr.BucketSize; _stats.Nodes = ArrayList.Synchronized(new ArrayList()); _initialJoiningStatusLatch = new Latch(); InitializeCluster(properties, Name, MCAST_DOMAIN, new Identity(true, (_context.Render != null ? _context.Render.Port : 0), (_context.Render != null ? _context.Render.IPAddress : null)), twoPhaseInitialization, false); _stats.GroupName = Cluster.ClusterName; _distributionMgr.LocalAddress = LocalAddress; postInstrumentatedData(_stats, Name); //Wait for the completion of installation of new view if (!twoPhaseInitialization) { _initialJoiningStatusLatch.WaitForAny(NodeStatus.Running); DetermineClusterStatus(); _statusLatch.SetStatusBit(NodeStatus.Running, NodeStatus.Initializing); AnnouncePresence(true); } for (int i = 0; i < confirmClusterStartUP; i++) { ConfirmClusterStartUP(false, i + 1); } HasStarted(); } catch (ConfigurationException) { Dispose(); throw; } catch (Exception e) { Dispose(); throw new ConfigurationException("Configuration Error: " + e.Message, e); } }
internal PORStateTxfrCorresponder(ClusterCacheBase parent, DistributionManager distMgr, Address requestingNode) : base(parent, distMgr, requestingNode, StateTransferType.REPLICATE_DATA) { }