Package org.jboss.remoting.transport.socket

Examples of org.jboss.remoting.transport.socket.LRUPool.evict()


      assertEquals(thread1, threads.get(2));
      Thread thread2 = (Thread) threads.get(1);
     
      // Verify newest thread gets evicted.
      Thread.sleep(4000); // +12000
      clientpool.evict();
      Thread.sleep(2000); // +14000
      threads = clientpool.getContentsByAscendingAge();
      assertEquals(3, threads.size());
      assertEquals(thread0, threads.get(2));
      assertEquals(thread1, threads.get(1));
View Full Code Here


      assertEquals(thread0, threads.get(2));
      assertEquals(thread1, threads.get(1));
      assertEquals(thread2, threads.get(0));
     
      // Verify none of the other threads is ready to be evicted.
      clientpool.evict();
      threads = clientpool.getContentsByAscendingAge();
      assertEquals(3, threads.size());
      assertEquals(thread0, threads.get(2));
      assertEquals(thread1, threads.get(1));
      assertEquals(thread2, threads.get(0));
View Full Code Here

      threads = clientpool.getContentsByAscendingAge();
      assertEquals(2, threads.size());
      assertEquals(thread1, threads.get(1));
      assertEquals(thread2, threads.get(0));
     
      clientpool.evict();
      Thread.sleep(2000); // +29000
      threads = clientpool.getContentsByAscendingAge();
      assertEquals(1, threads.size());
      assertEquals(thread2, threads.get(0));
     
View Full Code Here

      Thread.sleep(2000); // +29000
      threads = clientpool.getContentsByAscendingAge();
      assertEquals(1, threads.size());
      assertEquals(thread2, threads.get(0));
     
      clientpool.evict();
      Thread.sleep(2000); // +30000
      threads = clientpool.getContentsByAscendingAge();
      assertEquals(0, threads.size());
     
      client.disconnect();
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.