net.gdface.facedb.TableManagerInitializer Maven / Gradle / Ivy
package net.gdface.facedb;
import java.util.concurrent.TimeUnit;
import gu.sql2java.Constant.UpdateStrategy;
import static gu.sql2java.Managers.registerCacheManager;
/**
* 全局初始化数据库访问对象(TableManager)
* @author guyadong
*
*/
public class TableManagerInitializer {
static{
// 向底层数据库操作类注入当前项目使用的数据库连接配置
// Map databaseConfig = GlobalConfig.makeDatabaseConfig();
//GlobalConfig.logDatabaseProperties(databaseConfig);
// ManagerUtil.injectProperties(GlobalConfig.toStringKey(databaseConfig));
}
public static final TableManagerInitializer INSTANCE = new TableManagerInitializer();
private TableManagerInitializer() {
// 配置cache参数
registerCacheManager("fd_face",UpdateStrategy.always,10000,10,TimeUnit.MINUTES);
registerCacheManager("fd_image",UpdateStrategy.always,1000,10,TimeUnit.MINUTES);
registerCacheManager("fd_feature",UpdateStrategy.refresh,10000,10,TimeUnit.MINUTES);
}
public void init(){
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy