예제 #1
0
 public Delegate(RedisAdaptor adaptor, long contextLockId, TKey key, string dataId)
 {
     this.adaptor       = adaptor;
     this.contextLockId = contextLockId;
     this.key           = key;
     this.dataId        = dataId;
 }
예제 #2
0
        static void Main(string[] args)
        {
            AutoInit.Init();
            AmqpAdaptor AmqpAdaptor = new AmqpAdaptor(ConfigManager.MQIP(), ConfigManager.AMQPPort(),
                                                      ConfigManager.MQUser(), ConfigManager.MQPass());

            ServiceImplementStub.Bind <ICli2LoginImpl>(AmqpAdaptor, new LoginClientServiceImpl());
            ServiceImplementStub.Bind <ILoginNotifyImpl>(AmqpAdaptor, new LoginNotifyImpl());
            AmqpAdaptor.BeginReceive();

            RedisAdaptor     = new RedisAdaptor(ConfigManager.CacheConn());
            CacheDataService = new RedisDataServiceDelegate(RedisAdaptor);

            Console.ReadKey();
        }
예제 #3
0
        static void Main(string[] args)
        {
            RedisAdaptor = new RedisAdaptor(ConfigManager.CacheConn());
            MysqlAdaptor = new MysqlAdaptor(ConfigManager.DbIP(), ConfigManager.DbName(), ConfigManager.DbUser(), ConfigManager.DbPass());

            CacheDataService       = new RedisDataServiceDelegate(RedisAdaptor);
            PersistenceDataService = new MysqlDataServiceDelegate(MysqlAdaptor);

            while (true)
            {
                Console.WriteLine("begin check...");
                Console.WriteLine(ThreadInfo());

                Work().Wait();

                Thread.Sleep(TimeSpan.FromSeconds(30));
            }
        }
예제 #4
0
 public RedisDataServiceDelegate(RedisAdaptor adaptor)
 {
     this.adaptor = adaptor;
 }