Validation.begin().isNotNull("Sone ID", id).check();
synchronized (localSones) {
if (!localSones.containsKey(id) && create) {
- localSones.put(id, new Sone(id, true));
+ localSones.put(id, new MemorySone(id, true));
}
return localSones.get(id);
}
Validation.begin().isNotNull("Sone ID", id).check();
synchronized (remoteSones) {
if (!remoteSones.containsKey(id) && create) {
- remoteSones.put(id, new Sone(id, false));
+ remoteSones.put(id, new MemorySone(id, false));
}
return remoteSones.get(id);
}