Example #1
0
        public bool Equals(Apache.Geode.Client.ICacheableKey other)
        {
            ComplexNumber cOther = other as ComplexNumber;

            if (cOther != null)
            {
                return((m_real == cOther.m_real) && (m_imaginary == cOther.m_imaginary));
            }
            return(false);
        }
Example #2
0
        public override void AfterUpdate(Apache.Geode.Client.EntryEvent <Object, Object> ev)
        {
            m_updates++;
            m_lastKey   = (Apache.Geode.Client.ICacheableKey)ev.Key;
            m_lastValue = (Apache.Geode.Client.IGFSerializable)ev.NewValue;
            CheckcallbackArg(ev);

            string keyString = m_lastKey.ToString();

            WriteLog("TallyListener update - key = \"{0}\", value = \"{1}\"",
                     keyString, m_lastValue.ToString());

            if ((!m_ignoreTimeout) && (keyString.IndexOf("timeout") >= 0))
            {
                WriteLog("TallyListener: Sleeping 10 seconds to force a timeout.");
                Thread.Sleep(10000); // this should give the client cause to timeout...
                WriteLog("TallyListener: done sleeping..");
            }
        }