-package fi.vtt.simantics.procore.internal;\r
-\r
-import org.simantics.db.service.ClusterCollectorPolicy;\r
-import org.simantics.db.service.ClusterCollectorPolicy.CollectorCluster;\r
-\r
-class ClusterCollectorSupportImpl implements ClusterCollectorSupport {\r
-\r
- private final ClusterTable clusterTable;\r
-\r
- ClusterCollectorSupportImpl(ClusterTable clusterTable) {\r
- this.clusterTable = clusterTable;\r
- }\r
-\r
- @Override\r
- public void setPolicy(ClusterCollectorPolicy policy) {\r
- clusterTable.setCollectorPolicy(policy);\r
- }\r
- \r
- @Override\r
- public int getCurrentSize() {\r
- return (int)this.clusterTable.getSizeInBytes();\r
- }\r
- \r
- @Override\r
- public long getClusterSize(CollectorCluster id) {\r
- return clusterTable.getClusterByClusterId(id.getClusterId()).getCachedSize();\r
- }\r
- \r
- @Override\r
- public Iterable<CollectorCluster> getResidentClusters() {\r
- return clusterTable.importanceMap.values();\r
- }\r
-\r
- @Override\r
- public void release(CollectorCluster id) {\r
- clusterTable.release(id);\r
- }\r
- \r
+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<CollectorCluster> getResidentClusters() {
+ return clusterTable.importanceMap.values();
+ }
+
+ @Override
+ public void release(CollectorCluster id) {
+ clusterTable.release(id);
+ }
+
}
\ No newline at end of file