Package java.util.concurrent

Examples of java.util.concurrent.ThreadPoolExecutor$Worker


    public String getBlockPolicy() {
        return this.entry.getConfig().getBlockPolicy().name();
    }

    public int getExecutorActiveCount() {
        final ThreadPoolExecutor tpe = this.entry.getExecutor();
        if ( tpe != null ) {
            return tpe.getActiveCount();
        } else {
            return -1;
        }
    }
View Full Code Here


            return -1;
        }
    }

    public long getExecutorCompletedTaskCount() {
        final ThreadPoolExecutor tpe = this.entry.getExecutor();
        if ( tpe != null ) {
            return tpe.getCompletedTaskCount();
        } else {
            return -1;
        }
    }
View Full Code Here

            return -1;
        }
    }

    public int getExecutorCorePoolSize() {
        final ThreadPoolExecutor tpe = this.entry.getExecutor();
        if ( tpe != null ) {
            return tpe.getCorePoolSize();
        } else {
            return -1;
        }
    }
View Full Code Here

            return -1;
        }
    }

    public int getExecutorLargestPoolSize() {
        final ThreadPoolExecutor tpe = this.entry.getExecutor();
        if ( tpe != null ) {
            return tpe.getLargestPoolSize();
        } else {
            return -1;
        }
    }
View Full Code Here

            return -1;
        }
    }

    public int getExecutorMaximumPoolSize() {
        final ThreadPoolExecutor tpe = this.entry.getExecutor();
        if ( tpe != null ) {
            return tpe.getMaximumPoolSize();
        } else {
            return -1;
        }
    }
View Full Code Here

            return -1;
        }
    }

    public int getExecutorPoolSize() {
        final ThreadPoolExecutor tpe = this.entry.getExecutor();
        if ( tpe != null ) {
            return tpe.getPoolSize();
        } else {
            return -1;
        }
    }
View Full Code Here

            return -1;
        }
    }

    public long getExecutorTaskCount() {
        final ThreadPoolExecutor tpe = this.entry.getExecutor();
        if ( tpe != null ) {
            return tpe.getTaskCount();
        } else {
            return -1;
        }
    }
View Full Code Here

                pw.println(config.isShutdownGraceful());
                pw.print("- shutdown wait time : ");
                pw.println(config.getShutdownWaitTimeMs());
                pw.print("- daemon : ");
                pw.println(config.isDaemon());
                final ThreadPoolExecutor tpe = entry.getExecutor();
                if ( tpe != null ) {
                    pw.print("- active count : ");
                    pw.println(tpe.getActiveCount());
                    pw.print("- completed task count : ");
                    pw.println(tpe.getCompletedTaskCount());
                    pw.print("- core pool size : ");
                    pw.println(tpe.getCorePoolSize());
                    pw.print("- largest pool size : ");
                    pw.println(tpe.getLargestPoolSize());
                    pw.print("- maximum pool size : ");
                    pw.println(tpe.getMaximumPoolSize());
                    pw.print("- pool size : ");
                    pw.println(tpe.getPoolSize());
                    pw.print("- task count : ");
                    pw.println(tpe.getTaskCount());
                }
                pw.println();
            }
        } else {
            pw.println("No pools configured.");
View Full Code Here

                break;
            case RUN :
                handler = new ThreadPoolExecutor.CallerRunsPolicy();
                break;
        }
        this.executor = new ThreadPoolExecutor(this.configuration.getMinPoolSize(),
                this.configuration.getMaxPoolSize(),
                this.configuration.getKeepAliveTime(),
                TimeUnit.MILLISECONDS,
                queue,
                threadFactory,
View Full Code Here

        nettyThreadPools.getChannelGroup());

    // Create Thread pool for consumer threads
    int maxThreadsNum = 1;
    int keepAliveMs = 1000;
    ThreadPoolExecutor defaultExecutorService = new OrderedMemoryAwareThreadPoolExecutor(
        maxThreadsNum, 0, 0, keepAliveMs, TimeUnit.MILLISECONDS);

        ConsumerCallbackStats relayConsumerStats =
            new ConsumerCallbackStats(id,
                                      producerName + ".inbound.cons",
View Full Code Here

TOP

Related Classes of java.util.concurrent.ThreadPoolExecutor$Worker

Copyright © 2018 www.massapicom. 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.