public static void setPoolSize(int poolSize) throws TikaException {
        try {
            //stop the world with a write lock
            //parsers that are currently in use will be offered, but not
            //accepted and will be gc'd
            READ_WRITE_LOCK.writeLock().lock();
            SAX_PARSERS = new ArrayBlockingQueue<>(poolSize);
            for (int i = 0; i < poolSize; i++) {
                SAX_PARSERS.offer(newSAXParser());
            }
            POOL_SIZE = poolSize;
        } finally {
            READ_WRITE_LOCK.writeLock().unlock();
        }
    }
Set the pool size for cached XML parsers.

@param poolSize
tika-core/src/main/java/org/apache/tika/mime/MimeTypesReader.java