X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.acorn%2Fsrc%2Forg%2Fsimantics%2Facorn%2Flru%2FClusterChangeSet.java;h=cfe5c1357111a07c52de61887541bc6b49cc8933;hp=d0f3013d082ff6bea3aa8f3748be372d2da504a6;hb=d9a9d77c7024260e3e3b3a8558ddc84b2a8b99b3;hpb=6ceab2d9498554c1b825ab6ae76bef520bb05789 diff --git a/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterChangeSet.java b/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterChangeSet.java index d0f3013d0..cfe5c1357 100644 --- a/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterChangeSet.java +++ b/bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterChangeSet.java @@ -3,6 +3,8 @@ package org.simantics.acorn.lru; import java.util.ArrayList; import org.simantics.acorn.ClusterManager; +import org.simantics.acorn.exception.AcornAccessVerificationException; +import org.simantics.acorn.exception.IllegalAcornStateException; import org.simantics.acorn.internal.Change; import org.simantics.acorn.internal.ClusterChange; import org.simantics.db.procore.cluster.ClusterTraits; @@ -40,9 +42,9 @@ public class ClusterChangeSet { this.newValue = null; } - public Entry(int subject, boolean oldValueEx, byte[] oldValue, byte[] newValue) { + public Entry(int subject, boolean oldValueEx, byte[] oldValue, byte[] newValue) throws IllegalAcornStateException { if(oldValue == null && newValue == null) - throw new IllegalStateException(); + throw new IllegalAcornStateException("oldValue == null && newValue == null"); this.type = Type.VALUE; this.subject = (short)(subject & 0xFFF); this.predicate = 0; @@ -54,7 +56,7 @@ public class ClusterChangeSet { this.newValue = newValue; } - public void process(ClusterManager clusters, ClusterChange cs, int clusterKey) { + public void process(ClusterManager clusters, ClusterChange cs, int clusterKey) throws AcornAccessVerificationException { Entry e = this; @@ -113,7 +115,7 @@ public class ClusterChangeSet { chunkOffset = Integer.parseInt(ss[1]); } - public ClusterStreamChunk getChunk(ClusterManager manager) { + public ClusterStreamChunk getChunk(ClusterManager manager) throws AcornAccessVerificationException { return manager.streamLRU.get(chunkKey); }