org.voovan.tools.collection.ObjectPool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of voovan-framework Show documentation
Show all versions of voovan-framework Show documentation
Voovan is a java framwork and it not depends on any third-party framework.
package org.voovan.tools.collection;
import org.voovan.Global;
import org.voovan.tools.TEnv;
import org.voovan.tools.TString;
import org.voovan.tools.hashwheeltimer.HashWheelTask;
import org.voovan.tools.json.JSON;
import org.voovan.tools.reflect.annotation.NotSerialization;
import java.util.Iterator;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.function.Function;
import java.util.function.Supplier;
/**
* 对象池
* 支持超时清理,并且支持指定对象的借出和归还操作
* 仅仅按照时间长短控制对象的存活周期
*
* @author helyho
*
* Vestful Framework.
* WebSite: https://github.com/helyho/Vestful
* Licence: Apache v2 License
*/
public class ObjectPool {
private volatile ConcurrentHashMap
© 2015 - 2024 Weber Informatics LLC | Privacy Policy