X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FClusterChange.java;h=5a1dea2b9dc7117f343397aba07eb00e908bcac2;hb=refs%2Fchanges%2F85%2F1985%2F1;hp=1a264dc515d5329d22ec1f285f1043cf08771d1a;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterChange.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterChange.java index 1a264dc51..5a1dea2b9 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterChange.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterChange.java @@ -54,7 +54,9 @@ public final class ClusterChange { public ClusterImpl clusterImpl; public ClusterChange(ClusterStream clusterStream, ClusterImpl clusterImpl) { + this.clusterImpl = clusterImpl; + clusterUID = clusterImpl.getClusterUID(); long[] longs = new long[ClusterUID.getLongLength()]; clusterUID.toLong(longs, 0); @@ -69,9 +71,13 @@ public final class ClusterChange { Bytes.writeLE(header, offset, longs[i]); //initBuffer(); this.clusterStream = clusterStream; - this.clusterChange2 = new ClusterChange2(clusterUID, clusterImpl); + this.clusterChange2 = new ClusterChange2(clusterUID); clusterStream.changes.add(this); } + + public void adopt(ClusterImpl impl) { + this.clusterImpl = impl; + } private void setHeaderVectorSize(int size) { if (size < 0) @@ -81,7 +87,7 @@ public final class ClusterChange { } @Override public String toString() { - return super.toString() + " cluster=" + clusterImpl.getClusterUID() + " id=" + clusterImpl.getClusterId() + " off=" + byteIndex; + return super.toString() + " cluster=" + clusterUID + " id=" + clusterImpl.getClusterId() + " off=" + byteIndex; } private final void initBuffer() { flushed = false;