mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-19 20:25:31 +00:00
Bug 4716: Basic concurrency using ConcurrentHashMap
This commit is contained in:
+3
-3
@@ -1,8 +1,8 @@
|
||||
package com.sap.sailing.gwt.ui.server;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.google.gwt.user.client.rpc.SerializationException;
|
||||
import com.google.gwt.user.server.rpc.SerializationPolicy;
|
||||
@@ -19,10 +19,10 @@ public class ResultCachingProxiedRemoteServiceServlet extends DelegatingProxiedR
|
||||
private static final long serialVersionUID = -4245484615349695611L;
|
||||
|
||||
/**
|
||||
* FIXME: This is not the final solution but just a prototype! It's not thread save and it does not free results
|
||||
* FIXME: This is not the final solution but just a prototype! It does not evict results
|
||||
* ever. Just good enough for local tests with a single user.
|
||||
*/
|
||||
private Map<CacheKey, String> resultCache = new HashMap<>();
|
||||
private Map<CacheKey, String> resultCache = new ConcurrentHashMap<>();
|
||||
|
||||
@Override
|
||||
protected String encodeResponseForSuccess(Method serviceMethod, SerializationPolicy serializationPolicy, int flags,
|
||||
|
||||
Reference in New Issue
Block a user