List of usage examples for java.util.concurrent ConcurrentHashMap ConcurrentHashMap
public ConcurrentHashMap()
From source file:com.ab.http.AbRequestParams.java
/** * ?./* w w w . j a va 2s . co m*/ */ private void init() { urlParams = new ConcurrentHashMap<String, String>(); fileParams = new ConcurrentHashMap<String, FileWrapper>(); }
From source file:org.mimacom.sample.integration.patterns.user.service.web.JmsAndHystrixUserController.java
public JmsAndHystrixUserController(HystrixSearchServiceIntegration hystrixSearchServiceIntegration, JmsBasedIndexServiceIntegration jmsBasedIndexServiceIntegration) { this.hystrixSearchServiceIntegration = hystrixSearchServiceIntegration; this.jmsBasedIndexServiceIntegration = jmsBasedIndexServiceIntegration; this.userRepository = new ConcurrentHashMap<>(); }
From source file:com.library.loopj.android.http.PersistentCookieStore.java
/** * Construct a persistent cookie store.// w w w . j av a 2s . com * * @param context Context to attach cookie store to */ public PersistentCookieStore(Context context) { cookiePrefs = context.getSharedPreferences(COOKIE_PREFS, 0); cookies = new ConcurrentHashMap(); // Load any previously stored cookies into the store String storedCookieNames = cookiePrefs.getString(COOKIE_NAME_STORE, null); if (storedCookieNames != null) { String[] cookieNames = TextUtils.split(storedCookieNames, ","); for (String name : cookieNames) { String encodedCookie = cookiePrefs.getString(COOKIE_NAME_PREFIX + name, null); if (encodedCookie != null) { Cookie decodedCookie = decodeCookie(encodedCookie); if (decodedCookie != null) { cookies.put(name, decodedCookie); } } } // Clear out expired cookies clearExpired(new Date()); } }
From source file:ezbake.data.mongo.HandlerForDriverFindCalls.java
protected HandlerForDriverFindCalls(MongoDriverHandler handler) { this.parent_handler = handler; this.appName = parent_handler.handler.appName; this.dbName = parent_handler.handler.dbName; itMap = new ConcurrentHashMap<String, QueryResultIterator>(); gridFSInputFileMap = new ConcurrentHashMap<String, ObjectId>(); }
From source file:com.joyfulmongo.monitor.MonitorManager.java
private MonitorManager() { queryProfile = new ConcurrentHashMap<String, Record>(); updateProfile = new ConcurrentHashMap<String, Record>(); }
From source file:com.weibo.api.motan.registry.support.command.CommandServiceManager.java
public CommandServiceManager(URL refUrl) { LoggerUtil.info("CommandServiceManager init url:" + refUrl.toFullStr()); this.refUrl = refUrl; notifySet = new ConcurrentHashSet<NotifyListener>(); groupServiceCache = new ConcurrentHashMap<String, List<URL>>(); }
From source file:org.jasig.portlet.blackboardvcportlet.security.DelegatingPermissionEvaluator.java
@Autowired public void setPermissionTesters(Set<PermissionTester<Object>> permissionTesters) { final Builder<Class<Object>, PermissionTester<Object>> testersBuilder = ImmutableMap.builder(); for (final PermissionTester<Object> permissionTester : permissionTesters) { testersBuilder.put(permissionTester.getDomainObjectType(), permissionTester); }//from ww w . j ava 2 s . co m this.permissionTesterResolutionCache = new ConcurrentHashMap<Class<? extends Object>, PermissionTester<Object>>(); this.permissionTesters = testersBuilder.build(); }
From source file:com.openteach.diamond.rpc.protocol.diamond.DefaultRPCProtocol4Client.java
@Override public void initialize() { super.initialize(); targetMap = new ConcurrentHashMap<Target, HSFNetworkClientsHolder>(); }
From source file:com.ettrema.console.ConsoleResourceFactory.java
public ConsoleResourceFactory(ResourceFactory wrappedFactory, String consolePath, String secureResourcePath, List<ConsoleCommandFactory> factories, String contextPath) { this.factories = factories; this.wrappedFactory = wrappedFactory; this.consolePath = consolePath; this.contextPath = contextPath; this.consoleName = consolePath.substring(consolePath.lastIndexOf("/")); this.secureResourcePath = secureResourcePath; this.modDate = new Date(); mapOfFactories = new ConcurrentHashMap<String, ConsoleCommandFactory>(); for (ConsoleCommandFactory f : factories) { for (String cmdName : f.getCommandNames()) { log.debug("Console Command Factory: " + cmdName + " - " + f.getClass()); f.setConsoleResourceFactory(this); mapOfFactories.put(cmdName, f); }//from w w w . ja v a 2s . c om } String s = loadContent("/com/ettrema/console/console.html"); this.consolePageContent = loadContent("console.html"); this.dojoJsContent = loadContent("dojo.js"); }
From source file:edu.internet2.middleware.shibboleth.common.util.EventingMapBasedStorageService.java
/** Constructor. */ public EventingMapBasedStorageService() { store = new ConcurrentHashMap<String, Map<KeyType, ValueType>>(); }