示例#1
0
文件: Agent.cs 项目: xxjeng/nuxleus
        //MemoryStream m_memoryStream;

        public Agent ( LoadBalancer loadBalancer ) {
            m_loadBalancer = LoadBalancer.GetLoadBalancer();
            m_postOffice = null;
            m_resultHashtable = new Hashtable();
            m_transform = new Transform();
            m_callback = null;
        }
示例#2
0
 LoadBalancer(int size) {
     m_postOfficeQueue = new Queue<PostOffice>(size);
     m_loadBalancePostOfficeIndex = 0;
     for (int p = 0; p < size; p++) {
         PostOffice postOffice = new PostOffice();
         m_postOfficeQueue.Enqueue(postOffice);
     }
 }
示例#3
0
 LoadBalancer() {
     m_postOfficeQueue = new Queue<PostOffice>(m_processorCount);
     m_loadBalancePostOfficeIndex = 0;
     for (int p = 0; p < m_processorCount; p++) {
         PostOffice postOffice = new PostOffice();
         m_postOfficeQueue.Enqueue(postOffice);
     }
 }
示例#4
0
文件: Agent.cs 项目: xxjeng/nuxleus
 public void BeginRequest(IRequest request)
 {
     if (m_postOffice == null)
     {
         m_postOffice = m_loadBalancer.GetPostOffice;
     }
     AsyncCallback callBack = EndThisRequest;
     AsyncInvoke method1 = TestAsyncInvoke.Method1;
     Console.WriteLine("Calling BeginInvoke on Thread {0}", Thread.CurrentThread.ManagedThreadId);
     IAsyncResult asyncResult = method1.BeginInvoke(callBack, method1);
 }
示例#5
0
文件: Agent.cs 项目: xxjeng/nuxleus
 public Agent(LoadBalancer loadBalancer)
 {
     m_loadBalancer = LoadBalancer.GetLoadBalancer();
     m_postOffice = null;
     m_resultHashtable = new Hashtable();
 }