Examples of releaseExternalResources()


Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.releaseExternalResources()

    } catch (Throwable t) {
      if (callTimeoutPool != null) {
        callTimeoutPool.shutdownNow();
      }
      if (socketChannelFactory != null) {
        socketChannelFactory.releaseExternalResources();
      }
      if (t instanceof IOException) {
        throw new FlumeException(this + ": RPC connection error", t);
      } else if (t instanceof FlumeException) {
        throw (FlumeException) t;
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.releaseExternalResources()

        // Now close all channels
        System.out.println("close channelGroup");
        channelGroup.close().awaitUninterruptibly();
        // Now release resources
        System.out.println("close external resources");
        factory.releaseExternalResources();
    }
}
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.releaseExternalResources()

    } catch (Throwable t) {
      if (callTimeoutPool != null) {
        callTimeoutPool.shutdownNow();
      }
      if (socketChannelFactory != null) {
        socketChannelFactory.releaseExternalResources();
      }
      if (t instanceof IOException) {
        throw new FlumeException(this + ": RPC connection error", t);
      } else if (t instanceof FlumeException) {
        throw (FlumeException) t;
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.releaseExternalResources()

            counter.inc();
            bc.addEntry(addr, ledger, new byte[0], i, ChannelBuffers.wrappedBuffer(hello), cb, counter, 0);
        }
        counter.wait(0);
        System.out.println("Total = " + counter.total());
        channelFactory.releaseExternalResources();
        executor.shutdown();
    }
}
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.releaseExternalResources()

                        // we just want to trigger it connecting.
                    }
                });
            client.close();
        }
        channelFactory.releaseExternalResources();
        executor.shutdown();
    }

    /**
     * Test race scenario found in {@link https://issues.apache.org/jira/browse/BOOKKEEPER-5}
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.releaseExternalResources()

            for (int j = i; j < 10; j++) {
                client.connectIfNeededAndDoOp(nullop);
            }
            client.close();
        }
        channelFactory.releaseExternalResources();
        executor.shutdown();
    }

    /**
     * Test that all resources are freed if connections and disconnections
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.releaseExternalResources()

        connectThread.join();
        disconnectThread.join();
        checkThread.join();
        assertFalse("Failure in threads, check logs", shouldFail.get());
        client.close();
        channelFactory.releaseExternalResources();
        executor.shutdown();
    }

    /**
     * Test that requests are completed even if the channel is disconnected
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.releaseExternalResources()

        });

        Thread.sleep(1000);
        client.disconnect();
        client.close();
        channelFactory.releaseExternalResources();
        executor.shutdown();

        assertTrue("Request should have completed", completion.await(5, TimeUnit.SECONDS));
    }
}
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.releaseExternalResources()

            counter.inc();
            bc.addEntry(addr, ledger, new byte[0], i, ChannelBuffers.wrappedBuffer(hello), cb, counter, 0);
        }
        counter.wait(0);
        System.out.println("Total = " + counter.total());
        channelFactory.releaseExternalResources();
        executor.shutdown();
    }
}
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.releaseExternalResources()

    } catch (Throwable t) {
      if (callTimeoutPool != null) {
        callTimeoutPool.shutdownNow();
      }
      if (socketChannelFactory != null) {
        socketChannelFactory.releaseExternalResources();
      }
      if (t instanceof IOException) {
        throw new FlumeException(this + ": RPC connection error", t);
      } else if (t instanceof FlumeException) {
        throw (FlumeException) t;
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.