@Override public void putLocal(String key, V value) { super.putLocal(key, value); } }
public T reloadAt(String path) { try { T entity = store.getResource(path, serializer); if (entity == null) { logger.warn("No " + entityType.getSimpleName() + " found at " + path + ", returning null"); cache.removeLocal(resourceName(path)); return null; } // mark cached object entity.setCachedAndShared(true); entity = initEntityAfterReload(entity, resourceName(path)); if (path.equals(resourcePath(entity.resourceName())) == false) throw new IllegalStateException("The entity " + entity + " read from " + path + " will save to a different path " + resourcePath(entity.resourceName())); cache.putLocal(entity.resourceName(), entity); return entity; } catch (Exception e) { throw new IllegalStateException("Error loading " + entityType.getSimpleName() + " at " + path, e); } }
@Override public void putLocal(String key, V value) { super.putLocal(key, value); } }
public T reloadAt(String path) { try { T entity = store.getResource(path, serializer); if (entity == null) { logger.warn("No " + entityType.getSimpleName() + " found at " + path + ", returning null"); cache.removeLocal(resourceName(path)); return null; } // mark cached object entity.setCachedAndShared(true); entity = initEntityAfterReload(entity, resourceName(path)); if (path.equals(resourcePath(entity.resourceName())) == false) throw new IllegalStateException("The entity " + entity + " read from " + path + " will save to a different path " + resourcePath(entity.resourceName())); cache.putLocal(entity.resourceName(), entity); return entity; } catch (Exception e) { throw new IllegalStateException("Error loading " + entityType.getSimpleName() + " at " + path, e); } }