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

org.caiguoqing.uyuni.rpc.server.socketserver.Post Maven / Gradle / Ivy

The newest version!
/**
 * 
 */
package org.caiguoqing.uyuni.rpc.server.socketserver;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author org.caiguoqing
 * 
 */
public class Post {
	private static Post post = new Post();
	private final ExecutorService executor;
	private final int DEFAULT_THREAD_POOL_SIZE = 300;
	
	private Post(){
		executor = Executors.newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE);
	}
	
	public static Post getInstance(){
		return post;
	}
	
	public void process(SocketThread thread){
		executor.execute(thread);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy