|
|
@ -141,10 +141,10 @@ public class MapView {
|
|
|
|
assert newMap != null;
|
|
|
|
assert newMap != null;
|
|
|
|
key = normalizeKey(key);
|
|
|
|
key = normalizeKey(key);
|
|
|
|
assert blob != null;
|
|
|
|
assert blob != null;
|
|
|
|
synchronized (this) {
|
|
|
|
|
|
|
|
// write entry
|
|
|
|
|
|
|
|
String s = map2string(newMap, "W" + DateFormatter.formatShortSecond() + " ");
|
|
|
|
String s = map2string(newMap, "W" + DateFormatter.formatShortSecond() + " ");
|
|
|
|
assert s != null;
|
|
|
|
assert s != null;
|
|
|
|
|
|
|
|
synchronized (this) {
|
|
|
|
|
|
|
|
// write entry
|
|
|
|
blob.put(key.getBytes("UTF-8"), s.getBytes("UTF-8"));
|
|
|
|
blob.put(key.getBytes("UTF-8"), s.getBytes("UTF-8"));
|
|
|
|
|
|
|
|
|
|
|
|
// write map to cache
|
|
|
|
// write map to cache
|
|
|
@ -214,9 +214,6 @@ public class MapView {
|
|
|
|
Map<String, String> map = cache.get(key);
|
|
|
|
Map<String, String> map = cache.get(key);
|
|
|
|
if (map != null) return map;
|
|
|
|
if (map != null) return map;
|
|
|
|
|
|
|
|
|
|
|
|
// load map
|
|
|
|
|
|
|
|
if (!(blob.has(key.getBytes()))) return null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// read object
|
|
|
|
// read object
|
|
|
|
final byte[] b = blob.get(key.getBytes());
|
|
|
|
final byte[] b = blob.get(key.getBytes());
|
|
|
|
if (b == null) return null;
|
|
|
|
if (b == null) return null;
|
|
|
|