package com.its.vds.global; import com.its.vds.entity.TbVdsCtlr; import io.netty.channel.Channel; import lombok.Getter; import lombok.Setter; import lombok.extern.slf4j.Slf4j; import java.util.concurrent.ConcurrentHashMap; @Slf4j @Getter @Setter public class AppRepository { private static AppRepository _instance = null; public ConcurrentHashMap ctlrMap = null; public ConcurrentHashMap ctlrIpMap = null; public ConcurrentHashMap ctlrKeyMap = null; public ConcurrentHashMap ctlrChannelMap = null; public static AppRepository getInstance() { if (_instance == null) { synchronized (AppRepository.class) { if (_instance == null) _instance = new AppRepository(); } } return _instance; } public AppRepository() { this.ctlrMap = new ConcurrentHashMap<>(); this.ctlrIpMap = new ConcurrentHashMap<>(); this.ctlrKeyMap = new ConcurrentHashMap<>(); this.ctlrChannelMap = new ConcurrentHashMap<>(); } }