Code example for LinkedList

Methods: addremovesize

0
                officeConverter = new OfficeConverter();
            } 
            queueLock.unlock();
        } 
        queueLock.lock();
        runningQueue.add(file);
        queueLock.unlock();
        try { 
            logger.debug("toPDF after add size:" + runningQueue.size() + ".[" + file.getName() + "]");
            File pdf = null;
 
            File dir = deploy(file, outPath);
            pdf = new File(dir.getPath() + File.separator + FileUtils.getFilePrefix(file) + ".pdf");
            if (!pdf.exists()) {
                pdf = officeConverter.toPDF(file, dir.getPath());
            } 
 
            return pdf;
        } finally { 
            queueLock.lock();
            boolean isok = runningQueue.remove(file);
            logger.debug("toPDF after remove size:" + runningQueue.size() + ". isok:" + isok);
            queueLock.unlock();
        } 
    } 
}