List of usage examples for java.util.concurrent ConcurrentHashMap ConcurrentHashMap
public ConcurrentHashMap()
From source file:com.juhuasuan.osprey.ProcessorUtil.java
private ProcessorUtil(Map<Class<?>, OspreyProcessor<?>> _processors) { processors = new ConcurrentHashMap<Class<?>, OspreyProcessor<?>>(); if (null != _processors) { for (OspreyProcessor<?> p : _processors.values()) { registerProcessor(p);/*from w ww. j a v a 2 s . c om*/ } } }
From source file:org.openmrs.module.webservices.rest.util.ReflectionUtil.java
public static void clearCaches() { setterMethodCache = new ConcurrentHashMap<String, Method>(); getterMethodCache = new ConcurrentHashMap<String, Method>(); }
From source file:m.c.m.proxyma.context.ProxymaContextPool.java
/** * Constructor for this class/* w w w . java2 s. c om*/ */ public ProxymaContextPool() { this.proxymaContexts = new ConcurrentHashMap(); log = Logger.getLogger(""); }
From source file:ch.ralscha.extdirectspring.util.ApiCache.java
public ApiCache() { cache = new ConcurrentHashMap<ApiCacheKey, SoftReference<String>>(); }
From source file:com.ms.app.web.commons.statics.StaticResources.java
public void initData() { cache = new ConcurrentHashMap<String, String[]>(); clearSuffix(css); clearSuffix(appjs); clearSuffix(runjs); }
From source file:com.wineaccess.wineOWS.WineOwsAdapterHelper.java
/** * this method is to view the wine historical ows data based on wineId * if no wine historical ows data exists then copy winery ows data to wine ows data * @param viewWineOwsPO/*from www.j ava 2s .c o m*/ * return map the output map */ public static Map<String, Object> viewWineOwsData(final ViewWineOwsPO viewWineOwsPO) { logger.info("start view wine historical Ows data"); final Map<String, Object> output = new ConcurrentHashMap<String, Object>(); Response response = null; final ProductItemModel productModel = ProductItemRepository .getProductItemById(Long.parseLong(viewWineOwsPO.getProductId())); if (productModel == null) { response = ApplicationUtils.errorMessageGenerate( WineaccessErrorCodes.SystemErrorCode.WINE_OWS_ERROR_104, WineaccessErrorCodes.SystemErrorCode.WINE_OWS_ERROR_104_TEXT, SUCCESS_CODE); } else { final WineHistoricalOWSData historicalOwsData = WineOwsDataRepository .getOwsDataByWineId(productModel.getItemId()); if (historicalOwsData != null) { ViewWineOwsVO viewWineOwsVO = new ViewWineOwsVO(); final WineModel wineModel = WineRepository.getWineById(historicalOwsData.getWineId()); populateViewOwsVOFromPO(wineModel, historicalOwsData, viewWineOwsVO, productModel); response = new com.wineaccess.response.SuccessResponse(viewWineOwsVO, SUCCESS_CODE); } else if (historicalOwsData == null) { final WineModel wineModel = WineRepository.getWineById(productModel.getItemId()); if (wineModel != null) { WineryHistoricalOwsData wineryHistoricalOwsData = null; if (wineModel.getWineryId() != null) { wineryHistoricalOwsData = WineryOwsDataRepository .getOwsDataByWineryId(wineModel.getWineryId().getId()); } if (wineryHistoricalOwsData != null) { //Copy the winery historical data to wine historical data WineHistoricalOWSData wineHistoricalOWSData = new WineHistoricalOWSData(); wineHistoricalOWSData.setCeraCertEndDate(wineryHistoricalOwsData.getCeraCertEndDate()); wineHistoricalOWSData.setCeraCertNumber(wineryHistoricalOwsData.getCeraCertNumber()); wineHistoricalOWSData.setCeraCertStartDate(wineryHistoricalOwsData.getCeraCertStartDate()); wineHistoricalOWSData.setCeraLicenseNumber(wineryHistoricalOwsData.getCeraLicenseNumber()); wineHistoricalOWSData .setFullFillerWineryCode(wineryHistoricalOwsData.getFullFillerWineryCode()); wineHistoricalOWSData .setFullFillerWineryName(wineryHistoricalOwsData.getFullFillerWineryName()); wineHistoricalOWSData.setWineId(productModel.getItemId()); WineOwsDataRepository.save(wineHistoricalOWSData); ViewWineOwsVO viewWineOwsVO = new ViewWineOwsVO(); populateViewOwsVOFromPO(wineModel, wineHistoricalOWSData, viewWineOwsVO, productModel); response = new com.wineaccess.response.SuccessResponse(viewWineOwsVO, SUCCESS_CODE); } else { response = ApplicationUtils.errorMessageGenerate( WineaccessErrorCodes.SystemErrorCode.NO_ENTITY_FOUND, WineaccessErrorCodes.SystemErrorCode.NO_ENTITY_FOUND_TEXT, SUCCESS_CODE); } } else { response = ApplicationUtils.errorMessageGenerate( WineaccessErrorCodes.SystemErrorCode.WINE_OWS_ERROR_103, WineaccessErrorCodes.SystemErrorCode.WINE_OWS_ERROR_103_TEXT, SUCCESS_CODE); } } } output.put(OUPUT_PARAM_KEY, response); logger.info("exit view winery historical Ows data"); return output; }
From source file:com.baosight.buapx.ticketregistry.DefaultTicketRegistry.java
public DefaultTicketRegistry() { this.cache = new ConcurrentHashMap<String, Ticket>(); }
From source file:com.kenlin.awsec2offering.Cache.java
public Cache() { cache = new ConcurrentHashMap<String, ArrayNode>(); }
From source file:model.DefaultDataManagerImpl.java
public DefaultDataManagerImpl() { paymentList = new LinkedList<>(); netAmounts = new ConcurrentHashMap<>(); }
From source file:com.vmware.identity.openidconnect.sample.LogoutRequestTracker.java
public LogoutRequestTracker() { this.map = new ConcurrentHashMap<State, IDToken>(); }