579N/A * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Defines static methods to invoke a completion handler or arbitrary task. 0N/A // maximum number of completion handlers that may be invoked on the current 0N/A // thread before it re-directs invocations to the thread pool. This helps 0N/A // avoid stack overflow and lessens the risk of starvation. 0N/A // Per-thread object with reference to channel group and a counter for 0N/A // the number of completion handlers invoked. This should be reset to 0 0N/A // when all completion handlers have completed. 0N/A * Binds this thread to the given group 0N/A * Returns the GroupAndInvokeCount object for this thread. 0N/A * Returns true if the current thread is in a channel group's thread pool 0N/A * Returns true if the current thread is in the given channel's thread 0N/A * pool and we haven't exceeded the maximum number of handler frames on 0N/A * Invoke handler without checking the thread identity or number of handlers 0N/A * on the thread stack. 0N/A * Invoke handler assuming thread identity already checked 342N/A * Invokes the handler. If the current thread is in the channel group's 342N/A * thread pool then the handler is invoked directly, otherwise it is 0N/A // channel group shutdown; fallback to invoking directly 0N/A // if the current thread has the right identity. 0N/A * Invokes the handler indirectly via the channel group's thread pool. 0N/A * Invokes the handler "indirectly" in the given Executor 0N/A * Invokes the given task on the thread pool associated with the given 0N/A * channel. If the current thread is in the thread pool then the task is 263N/A * Invoke handler with completed result. This method does not check the 0N/A * thread identity or the number of handlers on the thread stack. 263N/A * Invoke handler with completed result. If the current thread is in the 0N/A * channel group's thread pool then the handler is invoked directly, 0N/A * otherwise it is invoked indirectly. 0N/A * Invoke handler with completed result. The handler is invoked indirectly, 0N/A * via the channel group's thread pool.