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

com.aliyun.openservices.paifeaturestore.datasource.HologresFactory Maven / Gradle / Ivy

There is a newer version: 1.1.3
Show newest version
package com.aliyun.openservices.paifeaturestore.datasource;

import java.util.HashMap;
import java.util.Map;

public class HologresFactory {
    private static Map hologresMap = new HashMap<>();

    public static void register(String name, Hologres hologres) {
        if (!hologresMap.containsKey(name)) {
            hologresMap.put(name, hologres);
        }
    }

    public static Hologres get(String name) {
        return hologresMap.get(name);
    }

    public static void close() throws Exception {
        for (Hologres hologres : hologresMap.values()) {
            hologres.close();
        }

        hologresMap.clear();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy