com.github.tobato.fastdfs.conn.FdfsConnectionPool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastdfs-client Show documentation
Show all versions of fastdfs-client Show documentation
基于yuqih发布的代码与fastdfs-client 官方1.26版本的重构
package com.github.tobato.fastdfs.conn;
import java.net.InetSocketAddress;
import org.apache.commons.pool2.KeyedPooledObjectFactory;
import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 定义Fdfs连接池对象
*
*
* 定义了对象池要实现的功能,对一个地址进行池化Map Pool
*
*
* @author tobato
*
*/
@Component
public class FdfsConnectionPool extends GenericKeyedObjectPool {
/**
* 默认构造函数
*
* @param factory
* @param config
*/
@Autowired
public FdfsConnectionPool(KeyedPooledObjectFactory factory,
GenericKeyedObjectPoolConfig config) {
super(factory, config);
}
/**
* 默认构造函数
*
* @param factory
*/
public FdfsConnectionPool(KeyedPooledObjectFactory factory) {
super(factory);
}
}