org.at4j.comp.bzip2
Interface BZip2EncoderExecutorService


public interface BZip2EncoderExecutorService

This interface identifies an executor service that is used to spread the encoding of bzip2 blocks over several threads. It can be used to speed up bzip2 encoding.

The executor service spreads the work over all threads available to it. If a BZip2OutputStream submits more work when all threads are busy, the call blocks until the next thread becomes available.

When the client is done using the executor, it must call shutdown() to release all of its resources.

An executor service instance can be had from the BZip2OutputStream.createExecutorService(int) method.

This interface does not expose any methods except the shutdown() method and there is no way of making a custom executor service implementation.

Since:
1.1
Author:
Karl Gustafsson

Method Summary
 void shutdown()
          This method should be called when the executor service is no longer needed.
 

Method Detail

shutdown

void shutdown()
This method should be called when the executor service is no longer needed. It terminates all threads and releases all other resources associated with the executor.