X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FClusterCollectorSupportImpl.java;h=2c8e43c12b0b20c6a4abb234b69de92ee23cda21;hp=3c6d0eabe3ada0a5cd7b01d1d62a3ae59083c6de;hb=cec265e1216a0a211e6e6dc4f91d5fda4c5747db;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterCollectorSupportImpl.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterCollectorSupportImpl.java index 3c6d0eabe..2c8e43c12 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterCollectorSupportImpl.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterCollectorSupportImpl.java @@ -1,39 +1,39 @@ -package fi.vtt.simantics.procore.internal; - -import org.simantics.db.service.ClusterCollectorPolicy; -import org.simantics.db.service.ClusterCollectorPolicy.CollectorCluster; - -class ClusterCollectorSupportImpl implements ClusterCollectorSupport { - - private final ClusterTable clusterTable; - - ClusterCollectorSupportImpl(ClusterTable clusterTable) { - this.clusterTable = clusterTable; - } - - @Override - public void setPolicy(ClusterCollectorPolicy policy) { - clusterTable.setCollectorPolicy(policy); - } - - @Override - public int getCurrentSize() { - return (int)this.clusterTable.getSizeInBytes(); - } - - @Override - public long getClusterSize(CollectorCluster id) { - return clusterTable.getClusterByClusterId(id.getClusterId()).getCachedSize(); - } - - @Override - public Iterable getResidentClusters() { - return clusterTable.importanceMap.values(); - } - - @Override - public void release(CollectorCluster id) { - clusterTable.release(id); - } - +package fi.vtt.simantics.procore.internal; + +import org.simantics.db.service.ClusterCollectorPolicy; +import org.simantics.db.service.ClusterCollectorPolicy.CollectorCluster; + +class ClusterCollectorSupportImpl implements ClusterCollectorSupport { + + private final ClusterTable clusterTable; + + ClusterCollectorSupportImpl(ClusterTable clusterTable) { + this.clusterTable = clusterTable; + } + + @Override + public void setPolicy(ClusterCollectorPolicy policy) { + clusterTable.setCollectorPolicy(policy); + } + + @Override + public int getCurrentSize() { + return (int)this.clusterTable.getSizeInBytes(); + } + + @Override + public long getClusterSize(CollectorCluster id) { + return clusterTable.getClusterByClusterId(id.getClusterId()).getCachedSize(); + } + + @Override + public Iterable getResidentClusters() { + return clusterTable.importanceMap.values(); + } + + @Override + public void release(CollectorCluster id) { + clusterTable.release(id); + } + } \ No newline at end of file