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

tgtools.tasklibrary.entity.DataCenter Maven / Gradle / Ivy

There is a newer version: 0.1.12
Show newest version
package tgtools.tasklibrary.entity;

import java.util.concurrent.ConcurrentLinkedQueue;


public class DataCenter {

	public DataCenter()
	{
		m_Data = new ConcurrentLinkedQueue();
	}
	private  ConcurrentLinkedQueue m_Data;

	private  synchronized ConcurrentLinkedQueue getDatas() {
		if (null == m_Data) {
			m_Data = new ConcurrentLinkedQueue();
		}
		return m_Data;
	}
	public int size()
	{
		return m_Data.size();
	}
	public  SqlEntity get() {
		if(!getDatas().isEmpty())
		return getDatas().poll();
		
		return null;
	}
	
	public  void add(SqlEntity p_Sql) {
		getDatas().add(p_Sql);
	}
	
	public  boolean isEmpty(){
		return getDatas().isEmpty();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy