Lines Matching refs:group

60             AsynchronousChannelGroup group;
63 group = AsynchronousChannelGroup.withCachedThreadPool(pool, rand.nextInt(5));
66 group = AsynchronousChannelGroup.withFixedThreadPool(nThreads, threadFactory);
68 group.shutdown();
69 if (!group.isShutdown())
71 // group should terminate quickly
72 boolean terminated = group.awaitTermination(3, TimeUnit.SECONDS);
79 // shutdown with channel in group
82 AsynchronousChannelGroup group;
85 group = AsynchronousChannelGroup.withCachedThreadPool(pool, rand.nextInt(10));
88 group = AsynchronousChannelGroup.withFixedThreadPool(nThreads, threadFactory);
90 // create channel that is bound to group
93 case 0 : ch = AsynchronousSocketChannel.open(group); break;
94 case 1 : ch = AsynchronousServerSocketChannel.open(group); break;
97 group.shutdown();
98 if (!group.isShutdown())
104 // group should terminate quickly
105 boolean terminated = group.awaitTermination(3, TimeUnit.SECONDS);
118 AsynchronousChannelGroup group;
121 group = AsynchronousChannelGroup
125 group = AsynchronousChannelGroup
131 .open(group).bind(new InetSocketAddress(0));
135 group.shutdownNow();
141 boolean terminated = group.awaitTermination(3, TimeUnit.SECONDS);
149 // test creating channels in group after group is shutdown
151 System.out.println("-- test operations after group is shutdown --");
152 AsynchronousChannelGroup group =
155 AsynchronousSocketChannel ch = AsynchronousSocketChannel.open(group);
156 AsynchronousServerSocketChannel listener = AsynchronousServerSocketChannel.open(group);
162 // shutdown group
163 group.shutdown();
164 if (!group.isShutdown())
169 AsynchronousSocketChannel.open(group);
174 AsynchronousServerSocketChannel.open(group);
197 // initiate another accept even though channel group is shutdown.
218 // group should *not* terminate as channels are open
219 boolean terminated = group.awaitTermination(3, TimeUnit.SECONDS);
223 // close channel; group should terminate quickly
226 terminated = group.awaitTermination(3, TimeUnit.SECONDS);