ARTEMIS-4406: update LocalCache persisted entry tracking to use a ConcurrentHashMap
This commit is contained in:
parent
df410da7ae
commit
c1648d5917
|
@ -27,6 +27,7 @@ import java.lang.invoke.MethodHandles;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class LocalCache implements Cache, RemovalListener<String, String> {
|
public class LocalCache implements Cache, RemovalListener<String, String> {
|
||||||
|
@ -70,7 +71,7 @@ public class LocalCache implements Cache, RemovalListener<String, String> {
|
||||||
@Override
|
@Override
|
||||||
public void start() {
|
public void start() {
|
||||||
if (persisted) {
|
if (persisted) {
|
||||||
persistedCacheEntries = storageManager.getPersistedKeyValuePairs(id);
|
persistedCacheEntries = new ConcurrentHashMap<>(storageManager.getPersistedKeyValuePairs(id));
|
||||||
|
|
||||||
if (persistedCacheEntries != null) {
|
if (persistedCacheEntries != null) {
|
||||||
for (Map.Entry<String, PersistedKeyValuePair> cacheEntry : persistedCacheEntries.entrySet()) {
|
for (Map.Entry<String, PersistedKeyValuePair> cacheEntry : persistedCacheEntries.entrySet()) {
|
||||||
|
|
Loading…
Reference in New Issue