Remove use of internal Apache Geode API o.a.g.internal.concurrent.ConcurrentHashSet class.

Replace with java.util.HashSet wrapped with java.util.Collections.synchronizedSet(:Set).
This commit is contained in:
John Blum
2020-01-24 19:10:32 -08:00
parent 6650afd0f2
commit dd593625d8

View File

@@ -15,14 +15,14 @@
*/
package example.app.caching.session.http.controller;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpSession;
import org.apache.geode.internal.concurrent.ConcurrentHashSet;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@@ -46,7 +46,7 @@ public class CounterController {
public static final String INDEX_TEMPLATE_VIEW_NAME = "index";
private final Set<String> sessionIds = new ConcurrentHashSet<>();
private final Set<String> sessionIds = Collections.synchronizedSet(new HashSet<>());
@GetMapping("/")
@ResponseBody