Code example for ThreadPoolExecutor

Methods: getQueue

0
        this.target.execute(command);
        if (logger.isDebugEnabled()) {
            StringBuilder buf = new StringBuilder();
            if (target instanceof ThreadPoolExecutor) {
                ThreadPoolExecutor pe = ((ThreadPoolExecutor) target);
                buf.append(pe.getQueue().size());
            } 
            if (command instanceof DataMonitorWriterImpl) {
                DataMonitorWriterImpl dw = (DataMonitorWriterImpl) command;
                buf.append("|" + dw.getContent());
            } 
            logger.debug(buf.toString());
        } 
    } 
 
}