package com.its.app.repository;

import com.its.app.vo.voIcmpCtlr;
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, voIcmpCtlr> wcamCtlrMap = null;
    public ConcurrentHashMap<String, voIcmpCtlr> cctvCtlrMap = null;

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

    public AppRepository() {
        this.wcamCtlrMap = new ConcurrentHashMap<>();
        this.cctvCtlrMap = new ConcurrentHashMap<>();
    }
}
