@Bean public HazelcastInstance hazelcastInstance() { MapAttributeConfig attributeConfig = new MapAttributeConfig() .setName(HazelcastSessionRepository.PRINCIPAL_NAME_ATTRIBUTE) .setExtractor(PrincipalNameExtractor.class.getName()); Config config = new Config(); config.getMapConfig(HazelcastSessionRepository.DEFAULT_SESSION_MAP_NAME) // <2> .addMapAttributeConfig(attributeConfig) .addMapIndexConfig(new MapIndexConfig( HazelcastSessionRepository.PRINCIPAL_NAME_ATTRIBUTE, false)); return Hazelcast.newHazelcastInstance(config); // <3> }
private void mapIndexesHandle(Node n, MapConfig mapConfig) { for (Node indexNode : childElements(n)) { if ("index".equals(cleanNodeName(indexNode))) { NamedNodeMap attrs = indexNode.getAttributes(); boolean ordered = getBooleanValue(getTextContent(attrs.getNamedItem("ordered"))); String attribute = getTextContent(indexNode); mapConfig.addMapIndexConfig(new MapIndexConfig(attribute, ordered)); } } }
private void mapIndexesHandle(Node n, MapConfig mapConfig) { for (Node indexNode : childElements(n)) { if ("index".equals(cleanNodeName(indexNode))) { NamedNodeMap attrs = indexNode.getAttributes(); boolean ordered = getBooleanValue(getTextContent(attrs.getNamedItem("ordered"))); String attribute = getTextContent(indexNode); mapConfig.addMapIndexConfig(new MapIndexConfig(attribute, ordered)); } } }
.addMapConfig(new MapConfig() .setName(taskDistributorName) .addMapIndexConfig(new MapIndexConfig("createdAtMillis", false)));
.setEnabled(true) .setClassName("com.networknt.oauth.cache.UserMapStore"); userConfig.addMapIndexConfig(new MapIndexConfig("email", true));