Esempio n. 1
0
        /// <summary>
        /// Read the region attributes for the given key.
        /// </summary>
        /// <param name="key">The key of the region to read.</param>
        /// <returns>The attributes of the region.</returns>
        public Apache.Geode.Client.RegionAttributes <string, string> GetRegionAttributes(string key)
        {
            FwkData data = ReadData(key);

            if (data != null && data.Kind == DataKind.Region)
            {
                Apache.Geode.Client.AttributesFactory <string, string> af    = new Apache.Geode.Client.AttributesFactory <string, string>();
                Apache.Geode.Client.RegionAttributes <string, string>  attrs = af.CreateRegionAttributes();
                byte[] attrsArr = data.Data2 as byte[];
                if (attrsArr != null && attrsArr.Length > 0)
                {
                    Apache.Geode.Client.DataInput dinp = new Apache.Geode.Client.DataInput(attrsArr);
                    attrs.FromData(dinp);
                }
                return(attrs);
            }
            return(null);
        }
Esempio n. 2
0
        public Apache.Geode.Client.Properties <string, string> GetPoolAttributes(string key)
        {
            FwkData data = ReadData(key);

            if (data != null && data.Kind == DataKind.Pool)
            {
                Apache.Geode.Client.Properties <string, string> prop = Apache.Geode.Client.Properties <string, string> .Create <string, string>();

                //RegionAttributes attrs = af.CreateRegionAttributes();
                byte[] attrsArr = data.Data2 as byte[];
                if (attrsArr != null && attrsArr.Length > 0)
                {
                    Apache.Geode.Client.DataInput dinp = new Apache.Geode.Client.DataInput(attrsArr);
                    prop.FromData(dinp);
                }
                return(prop);
            }
            return(null);
        }
Esempio n. 3
0
 /// <summary>
 /// Read the complex number from the <see cref="DataInput" /> stream.
 /// </summary>
 /// <param name="input">The <c>DataInput</c> stream.</param>
 /// <returns>A reference to <c>this</c> object.</returns>
 public Apache.Geode.Client.IGFSerializable FromData(Apache.Geode.Client.DataInput input)
 {
     m_real      = input.ReadDouble();
     m_imaginary = input.ReadDouble();
     return(this);
 }