package com.its.wthr.repository;

import com.its.wthr.vo.AtmpPltnVo;
import com.its.wthr.vo.FrcsZoneVo;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.ConcurrentHashMap;

@Getter
@Setter
@Slf4j
public class AppRepository {
    private static AppRepository _instance = null;

    public ConcurrentHashMap<String, AtmpPltnVo> atmpPltnMap = null;
    public ConcurrentHashMap<String, FrcsZoneVo> frcsZoneMap = null;

    public static AppRepository getInstance() {
        if (_instance == null) {
            synchronized (AppRepository.class) {
                if (_instance == null)
                    _instance = new AppRepository();
            }
        }
        return _instance;
    }

    public AppRepository() {
        this.atmpPltnMap = new ConcurrentHashMap<>();
        this.frcsZoneMap = new ConcurrentHashMap<>();
    }
}
