Code example for ThreadPoolExecutor

class Gpx10FileLogger implements IFileLogger 
    protected final static Object lock = new Object();
    private final static ThreadPoolExecutor EXECUTOR = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS,
            new LinkedBlockingQueue<Runnable>(128), new RejectionHandler());
    private File gpxFile = null;
    private final boolean addNewTrackSegment;
    private final int satelliteCount;
    protected final String name = "GPX";
    Gpx10FileLogger(File gpxFile, boolean addNewTrackSegment, int satelliteCount)
        this.gpxFile = gpxFile;
        this.addNewTrackSegment = addNewTrackSegment;
        this.satelliteCount = satelliteCount;
Connect your IDE to all the code out there  Get Codota for Java