Exemple #1
0
        //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;
        }
Exemple #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);
     }
 }
Exemple #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);
     }
 }
Exemple #4
0
 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);
 }
Exemple #5
0
 public Agent(LoadBalancer loadBalancer)
 {
     m_loadBalancer = LoadBalancer.GetLoadBalancer();
     m_postOffice = null;
     m_resultHashtable = new Hashtable();
 }