/** * @throws Exception If failed. */ private static void testLinkedBlockingDeque() throws Exception { X.println("Linked blocking deque..."); testQueue(new LinkedBlockingDeque<Integer>()); testQueueMultiThreaded(new LinkedBlockingDeque<Integer>()); }
/** * */ private static void testSynchronizedMethod() { n = 0; long start = System.currentTimeMillis(); for (long i = 0; i < MAX; i++) increment(); long time = System.currentTimeMillis() - start; X.println("Synchronized method time: " + time); }
/** * @throws Exception If failed. */ private static void testLinkedBlockingQueue() throws Exception { X.println("Linked blocking queue..."); testQueue(new LinkedBlockingQueue<Integer>()); testQueueMultiThreaded(new LinkedBlockingQueue<Integer>()); }
/** * @throws Exception If failed. */ private static void testConcurrentQueue() throws Exception { X.println("Concurrent queue..."); testQueue(new ConcurrentLinkedQueue<Integer>()); testQueueMultiThreaded(new ConcurrentLinkedQueue<Integer>()); }
/** * @throws Exception If failed. */ private static void testGridDeque() throws Exception { X.println("Grid deque..."); testQueue(new ConcurrentLinkedDeque8<Integer>()); testQueueMultiThreaded(new ConcurrentLinkedDeque8<Integer>()); }