use of im.actor.runtime.storage.ListEngineRecord in project actor-platform by actorapp.
the class MemoryListEngine method loadValue.
private T loadValue(long key) {
T res = cache.lookup(key);
if (res != null) {
return res;
}
ListEngineRecord record = storage.loadItem(key);
if (record == null) {
return null;
}
try {
res = creator.createInstance();
res.parse(new BserValues(BserParser.deserialize(new DataInput(record.getData()))));
} catch (IOException e) {
e.printStackTrace();
return null;
}
cache.onObjectLoaded(key, res);
return res;
}
Aggregations