Skip to content

Commit

Permalink
ARTEMIS-4406: update LocalCache persisted entry tracking to use a Con…
Browse files Browse the repository at this point in the history
…currentHashMap
  • Loading branch information
gemmellr committed Aug 29, 2023
1 parent df410da commit c1648d5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;

public class LocalCache implements Cache, RemovalListener<String, String> {
Expand Down Expand Up @@ -70,7 +71,7 @@ public LocalCache(String id, boolean persisted, int timeout, StorageManager stor
@Override
public void start() {
if (persisted) {
persistedCacheEntries = storageManager.getPersistedKeyValuePairs(id);
persistedCacheEntries = new ConcurrentHashMap<>(storageManager.getPersistedKeyValuePairs(id));

if (persistedCacheEntries != null) {
for (Map.Entry<String, PersistedKeyValuePair> cacheEntry : persistedCacheEntries.entrySet()) {
Expand Down

0 comments on commit c1648d5

Please sign in to comment.