Examples of LRUPool


Examples of org.jboss.remoting.transport.socket.LRUPool

      // Verify that "timeout" is used correctly.
      assertTrue(connector.getServerInvoker() instanceof SocketServerInvoker);
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(serverInvoker);
      Set threads = clientpool.getContents();
      assertEquals(1, threads.size());
      ServerThread serverThread = (ServerThread) threads.iterator().next();
      field = ServerThread.class.getDeclaredField("socketWrapper");
      field.setAccessible(true);
      assertTrue(field.get(serverThread) instanceof ServerSocketWrapper);
View Full Code Here

Examples of org.jboss.remoting.transport.socket.LRUPool

               ServerInvoker si = connector.getServerInvoker();
               assertTrue(si instanceof SocketServerInvoker);
               SocketServerInvoker ssi = (SocketServerInvoker) si;
               Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
               field.setAccessible(true);
               LRUPool clientpool = (LRUPool) field.get(ssi);
               Set threads = clientpool.getContents();
               Iterator it = threads.iterator();
               while (it.hasNext())
               {
                  ServerThread t = (ServerThread) it.next();
                  t.shutdown();
View Full Code Here

Examples of org.jboss.remoting.transport.socket.LRUPool

      // Verify that "timeout" is used correctly.
      assertTrue(connector.getServerInvoker() instanceof SocketServerInvoker);
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(serverInvoker);
      Set threads = clientpool.getContents();
      assertEquals(1, threads.size());
      ServerThread serverThread = (ServerThread) threads.iterator().next();
      field = ServerThread.class.getDeclaredField("socketWrapper");
      field.setAccessible(true);
      assertTrue(field.get(serverThread) instanceof ServerSocketWrapper);
View Full Code Here

Examples of org.jboss.remoting.transport.socket.LRUPool

      // Verify that "timeout" is used correctly.
      assertTrue(connector.getServerInvoker() instanceof SocketServerInvoker);
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(serverInvoker);
      Set threads = clientpool.getContents();
      assertEquals(1, threads.size());
      ServerThread serverThread = (ServerThread) threads.iterator().next();
      field = ServerThread.class.getDeclaredField("socketWrapper");
      field.setAccessible(true);
      assertTrue(field.get(serverThread) instanceof ServerSocketWrapper);
View Full Code Here

Examples of org.jboss.remoting.transport.socket.LRUPool

      // Verify that "timeout" is used correctly.
      assertTrue(connector.getServerInvoker() instanceof SocketServerInvoker);
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(serverInvoker);
      Set threads = clientpool.getContents();
      assertEquals(1, threads.size());
      ServerThread serverThread = (ServerThread) threads.iterator().next();
      field = ServerThread.class.getDeclaredField("socketWrapper");
      field.setAccessible(true);
      assertTrue(field.get(serverThread) instanceof ServerSocketWrapper);
View Full Code Here

Examples of org.jboss.remoting.transport.socket.LRUPool

               ServerInvoker si = connector.getServerInvoker();
               assertTrue(si instanceof SocketServerInvoker);
               SocketServerInvoker ssi = (SocketServerInvoker) si;
               Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
               field.setAccessible(true);
               LRUPool clientpool = (LRUPool) field.get(ssi);
               Set threads = clientpool.getContents();
               Iterator it = threads.iterator();
               while (it.hasNext())
               {
                  ServerThread t = (ServerThread) it.next();
                  t.shutdown();
View Full Code Here

Examples of org.jboss.remoting.transport.socket.LRUPool

        
         // Wait for there to be two ServerThreads in the master
         // MultiplexServerInvoker's clientpool.
         field = SocketServerInvoker.class.getDeclaredField("clientpool");
         field.setAccessible(true);
         LRUPool clientpool = (LRUPool) field.get(connector.getServerInvoker());
         for (int i = 0; i < 5; i++)
         {
            if (clientpool.size() == 2)
               break;
            Thread.sleep(1000);
         }
         if (clientpool.size() != 2)
            fail();

         // Wait for the two virtual MultiplexServerInvokers to shut down.
         client1.disconnect();
         client2.disconnect();
         for (int i = 0; i < 5; i++)
         {
            if (virtualServerInvokers.size() == 0)
               break;
            Thread.sleep(1000);
         }
         assertTrue(virtualServerInvokers.size() == 0);

         // Verify that the master MultiplexServerInvoker still has two ServerThreads.
         field = SocketServerInvoker.class.getDeclaredField("threadpool");
         field.setAccessible(true);
         LinkedList threadpool = (LinkedList) field.get(connector.getServerInvoker());
         assertTrue(clientpool.size() + threadpool.size() == 2);
        
         log.info(getName() + " PASSES");
         OKCounter++;
      }
      catch (Throwable t)
View Full Code Here

Examples of org.jboss.remoting.transport.socket.LRUPool

      // Make sure server has object streams.
      assertTrue(connector.getServerInvoker() instanceof SocketServerInvoker);
      SocketServerInvoker ssi = (SocketServerInvoker) connector.getServerInvoker();
      field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(ssi);
      assertEquals(1, clientpool.size());
      Set threads = clientpool.getContents();
      ServerThread serverThread = (ServerThread) threads.iterator().next();
      field = ServerThread.class.getDeclaredField("socketWrapper");
      field.setAccessible(true);
      ServerSocketWrapper ssw = (ServerSocketWrapper) field.get(serverThread);
      field = ClientSocketWrapper.class.getDeclaredField("in");
View Full Code Here

Examples of org.jboss.remoting.transport.socket.LRUPool

      // Make sure server has object streams from test directory.
      assertTrue(connector.getServerInvoker() instanceof SocketServerInvoker);
      SocketServerInvoker ssi = (SocketServerInvoker) connector.getServerInvoker();
      field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(ssi);
      assertEquals(1, clientpool.size());
      Set threads = clientpool.getContents();
      ServerThread serverThread = (ServerThread) threads.iterator().next();
      field = ServerThread.class.getDeclaredField("socketWrapper");
      field.setAccessible(true);
      ServerSocketWrapper ssw = (ServerSocketWrapper) field.get(serverThread);
      field = ClientSocketWrapper.class.getDeclaredField("in");
View Full Code Here

Examples of org.jboss.remoting.transport.socket.LRUPool

        
         if(maxPoolSize <= 0)
         {
            maxPoolSize = MAX_POOL_SIZE_DEFAULT;
         }
         clientpool = new LRUPool(2, maxPoolSize);
         clientpool.create();
         threadpool = new LinkedList();
         checkSocketFactoryWrapper();

         controlMonitorTimerTask = new ControlMonitorTimerTask(this);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.