All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quincy.sdk.GlobalSync Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package com.quincy.sdk;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class GlobalSync {
	private static BlockingQueue blockingQueue = null;
	private static ThreadPoolExecutor threadPoolExecutor = null;

	static {
		if(blockingQueue==null)
			blockingQueue = new LinkedBlockingQueue(100000);
		if(threadPoolExecutor==null)
			threadPoolExecutor = new ThreadPoolExecutor(100, 100, 10, TimeUnit.SECONDS, blockingQueue);
	}

	public static ThreadPoolExecutor getThreadPoolExecutor() {
		return threadPoolExecutor;
	}
	public static BlockingQueue getBlockingQueue() {
		return blockingQueue;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy