Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheConfiguration"/> class,
        /// performing a deep copy of specified cache configuration.
        /// </summary>
        /// <param name="other">The other configuration to perfrom deep copy from.</param>
        public CacheClientConfiguration(CacheClientConfiguration other)
        {
            if (other != null)
            {
                using (var stream = IgniteManager.Memory.Allocate().GetStream())
                {
                    ClientCacheConfigurationSerializer.Write(stream, other, ClientSocket.CurrentProtocolVersion, true);

                    stream.SynchronizeOutput();
                    stream.Seek(0, SeekOrigin.Begin);

                    ClientCacheConfigurationSerializer.Read(stream, this, ClientSocket.CurrentProtocolVersion);
                }

                CopyLocalProperties(other);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheClientConfiguration"/> class.
        /// </summary>
        internal CacheClientConfiguration(IBinaryStream stream, ClientProtocolVersion srvVer)
        {
            Debug.Assert(stream != null);

            ClientCacheConfigurationSerializer.Read(stream, this, srvVer);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheClientConfiguration"/> class.
        /// </summary>
        internal CacheClientConfiguration(IBinaryStream stream)
        {
            Debug.Assert(stream != null);

            ClientCacheConfigurationSerializer.Read(stream, this);
        }