Code example for ThreadPoolExecutor

Methods: awaitTerminationshutdownshutdownNow

0
 
        nodeSettingsService.addListener(new ApplySettings());
    } 
 
    public void close() { 
        concurrentStreamPool.shutdown();
        try { 
            concurrentStreamPool.awaitTermination(1, TimeUnit.SECONDS);
        } catch (InterruptedException e) {
            // that's fine... 
        } 
        concurrentStreamPool.shutdownNow();
    } 
 
    public ByteSizeValue fileChunkSize() { 
        return fileChunkSize;
    } 
 
    public boolean compress() { 
        return compress;
Stop searching for code, let great code find you!  Add Codota to your java IDE