Timestamps (int id, boolean createIfNoneSaved) { assert id > 0; Timestamps timestamps = ourTimestampsCache.get(id); if (timestamps == null) { TimestampsImmutable immutable = storage.invoke().readTimestamps(id); if (immutable == null) { if (createIfNoneSaved) { timestamps = new Timestamps(); } else { return null; } } else { timestamps = immutable.toMutableTimestamps(); } } ourTimestampsCache.cacheOrGet(id, timestamps); return timestamps; }