dbeaver/dbeaver-ee#1817 New resource caching. API enhancements

This commit is contained in:
Serge Rider
2022-07-29 18:28:27 +03:00
parent 5a39da7a1c
commit 3a398ba5c8
@@ -100,7 +100,7 @@ public class LocalResourceController implements RMController {
return userId == null ? null : this.userProjectsPath.resolve(userId);
}
private DBPProject getProjectMetadata(String projectId) throws DBException {
private VirtualProjectImpl getProjectMetadata(String projectId) throws DBException {
synchronized (projectRegistries) {
VirtualProjectImpl project = projectRegistries.get(projectId);
if (project == null) {
@@ -400,6 +400,10 @@ public class LocalResourceController implements RMController {
} catch (IOException e) {
throw new DBException("Error deleting resource '" + resourcePath + "'", e);
}
// Nullify resource properties if any
VirtualProjectImpl project = getProjectMetadata(projectId);
project.resetResourceProperties(resourcePath);
RMEventManager.fireEvent(
new RMEvent(RMEvent.Action.RESOURCE_DELETE,
makeProjectFromId(projectId, false),