Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-09-17 06:54:52 +0000
committerEike Stepper2012-09-17 06:54:52 +0000
commita0ff8689e231b70edaed471cc194ad4ab0f1ead7 (patch)
tree7b2cf50941b31dc555a4aff3c13dd4e844e4c102 /plugins
parent8a13b0ae3e7520ded8593acd0e128ae5f952d937 (diff)
downloadcdo-a0ff8689e231b70edaed471cc194ad4ab0f1ead7.tar.gz
cdo-a0ff8689e231b70edaed471cc194ad4ab0f1ead7.tar.xz
cdo-a0ff8689e231b70edaed471cc194ad4ab0f1ead7.zip
[389694] Relax view options (CDOInvalidationPolicy and
CDOStaleReferencePolicy) https://bugs.eclipse.org/bugs/show_bug.cgi?id=389694
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/.settings/.api_filters16
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOInvalidationPolicy.java9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOStaleReferencePolicy.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java4
5 files changed, 31 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
index 5edc2348f6..7c6bb4aa0e 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
@@ -397,7 +397,7 @@ public class ServerCDOView extends AbstractCDOView implements org.eclipse.emf.cd
public CDOStaleReferencePolicy getStaleReferencePolicy()
{
- return CDOStaleReferencePolicy.EXCEPTION;
+ return CDOStaleReferencePolicy.DEFAULT;
}
public void setStaleReferencePolicy(CDOStaleReferencePolicy policy)
diff --git a/plugins/org.eclipse.emf.cdo/.settings/.api_filters b/plugins/org.eclipse.emf.cdo/.settings/.api_filters
index ba3dca80d2..0d93a2fbab 100644
--- a/plugins/org.eclipse.emf.cdo/.settings/.api_filters
+++ b/plugins/org.eclipse.emf.cdo/.settings/.api_filters
@@ -102,6 +102,14 @@
</message_arguments>
</filter>
</resource>
+ <resource path="src/org/eclipse/emf/cdo/view/CDOInvalidationPolicy.java" type="org.eclipse.emf.cdo.view.CDOInvalidationPolicy">
+ <filter id="403767336">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.view.CDOInvalidationPolicy"/>
+ <message_argument value="STRICT"/>
+ </message_arguments>
+ </filter>
+ </resource>
<resource path="src/org/eclipse/emf/cdo/view/CDOQuery.java" type="org.eclipse.emf.cdo.view.CDOQuery">
<filter id="571473929">
<message_arguments>
@@ -110,6 +118,14 @@
</message_arguments>
</filter>
</resource>
+ <resource path="src/org/eclipse/emf/cdo/view/CDOStaleReferencePolicy.java" type="org.eclipse.emf.cdo.view.CDOStaleReferencePolicy">
+ <filter id="403767336">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.view.CDOStaleReferencePolicy"/>
+ <message_argument value="DEFAULT"/>
+ </message_arguments>
+ </filter>
+ </resource>
<resource path="src/org/eclipse/emf/cdo/view/CDOView.java" type="org.eclipse.emf.cdo.view.CDOView">
<filter id="571473929">
<message_arguments>
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOInvalidationPolicy.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOInvalidationPolicy.java
index 447daea00b..6da1c690ae 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOInvalidationPolicy.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOInvalidationPolicy.java
@@ -19,14 +19,17 @@ import org.eclipse.emf.spi.cdo.InternalCDOObject;
/**
* A strategy interface to customize the invalidation behaviour of a {@link CDOView view}.
- *
+ *
* @see Options#setInvalidationPolicy(CDOInvalidationPolicy)
* @author Eike Stepper
* @since 3.0
*/
public interface CDOInvalidationPolicy
{
- public static final CDOInvalidationPolicy DEFAULT = new CDOInvalidationPolicy()
+ /**
+ * @since 4.2
+ */
+ public static final CDOInvalidationPolicy STRICT = new CDOInvalidationPolicy()
{
public void handleInvalidation(CDOObject object, CDORevisionKey key)
{
@@ -52,6 +55,8 @@ public interface CDOInvalidationPolicy
}
};
+ public static final CDOInvalidationPolicy DEFAULT = RELAXED;
+
public void handleInvalidation(CDOObject object, CDORevisionKey key);
public void handleInvalidObject(CDOObject object);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOStaleReferencePolicy.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOStaleReferencePolicy.java
index 93cbb57904..4974462e02 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOStaleReferencePolicy.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOStaleReferencePolicy.java
@@ -126,6 +126,11 @@ public interface CDOStaleReferencePolicy
};
/**
+ * @since 4.2
+ */
+ public static final CDOStaleReferencePolicy DEFAULT = PROXY;
+
+ /**
* Returns an object that we want to return to the caller (clients). Exception thrown will be received by the caller
* (clients).
*/
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
index 24cf754c16..42cbcfb261 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
@@ -1670,7 +1670,7 @@ public class CDOViewImpl extends AbstractCDOView
private CDOFeatureAnalyzer featureAnalyzer = CDOFeatureAnalyzer.NOOP;
- private CDOStaleReferencePolicy staleReferencePolicy = CDOStaleReferencePolicy.EXCEPTION;
+ private CDOStaleReferencePolicy staleReferencePolicy = CDOStaleReferencePolicy.DEFAULT;
private HashBag<CDOAdapterPolicy> changeSubscriptionPolicies = new HashBag<CDOAdapterPolicy>();
@@ -1955,7 +1955,7 @@ public class CDOViewImpl extends AbstractCDOView
{
if (policy == null)
{
- policy = CDOStaleReferencePolicy.EXCEPTION;
+ policy = CDOStaleReferencePolicy.DEFAULT;
}
IEvent event = null;

Back to the top