]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/SessionGarbageCollection.java
Some fixes/cleanup for cluster table size caching logic.
[simantics/platform.git] / bundles / org.simantics.db.layer0 / src / org / simantics / db / layer0 / util / SessionGarbageCollection.java
index 26e049db67d5d95c87e47e56d81b9ad843ac4572..c168e22860b25dba84ff1b715376c4a878effcfb 100644 (file)
@@ -25,7 +25,6 @@ import org.simantics.db.service.ClusterControl;
 import org.simantics.db.service.LifecycleSupport;
 import org.simantics.db.service.QueryControl;
 import org.simantics.utils.DataContainer;
-import org.simantics.utils.datastructures.Callback;
 
 /**
  * @author Tuukka Lehtonen
@@ -132,15 +131,12 @@ public class SessionGarbageCollection {
                     Logger.defaultLogError(e);
             }
         } else {
-            session.asyncRequest(request, new Callback<DatabaseException>() {
-                @Override
-                public void run(DatabaseException e) {
-                    if (e != null) {
-                        if (errorCallback != null)
-                            errorCallback.accept(e);
-                        else
-                            Logger.defaultLogError(e);
-                    }
+            session.asyncRequest(request, e -> {
+                if (e != null) {
+                    if (errorCallback != null)
+                        errorCallback.accept(e);
+                    else
+                        Logger.defaultLogError(e);
                 }
             });
         }