Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-08-02 08:34:39 +0000
committerEike Stepper2012-08-02 08:34:39 +0000
commit599cf8257167a7695ef7be4c07ddf67b9dbb8ad8 (patch)
tree9ea4db9c93df9b2b91fde1003224480b69e99f39 /plugins/org.eclipse.emf.cdo/src/org/eclipse/emf
parentefe134411cb0a956f579a5545a841a8491c80599 (diff)
downloadcdo-599cf8257167a7695ef7be4c07ddf67b9dbb8ad8.tar.gz
cdo-599cf8257167a7695ef7be4c07ddf67b9dbb8ad8.tar.xz
cdo-599cf8257167a7695ef7be4c07ddf67b9dbb8ad8.zip
[386413] Add option to serialize commits
https://bugs.eclipse.org/bugs/show_bug.cgi?id=386413
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf')
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/messages/messages.properties2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java96
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java16
3 files changed, 109 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/messages/messages.properties b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/messages/messages.properties
index e5d4e6574e..e2735e5aa2 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/messages/messages.properties
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/messages/messages.properties
@@ -119,6 +119,8 @@ SessionPropertyTester_34=Open
SessionPropertyTester_35=Whether this session is open or not.
SessionPropertyTester_36=Last Update
SessionPropertyTester_37=The time stamp of the last passive update.
+SessionPropertyTester_38=Serialize Commits
+SessionPropertyTester_39=Whether the repository of this session is serializing commits.
SessionPropertyTester_3=The ID of this session.
SessionPropertyTester_4=User
SessionPropertyTester_5=The ID of the authenticated user of this session.
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java
index 8dce79a8e4..cffc64997c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/SessionProperties.java
@@ -4,13 +4,15 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Eike Stepper - initial API and implementation
*/
package org.eclipse.emf.internal.cdo.session;
+import org.eclipse.emf.cdo.common.CDOCommonRepository;
import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOID.ObjectType;
import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
import org.eclipse.emf.cdo.session.CDOSession;
@@ -21,10 +23,12 @@ import org.eclipse.net4j.util.properties.IProperties;
import org.eclipse.net4j.util.properties.Properties;
import org.eclipse.net4j.util.properties.Property;
+import java.util.Set;
+
/**
* @author Eike Stepper
*/
-public class SessionProperties extends Properties<CDOSession>
+public class SessionProperties extends Properties<CDOSession> implements CDOCommonRepository
{
public static final IProperties<CDOSession> INSTANCE = new SessionProperties();
@@ -59,7 +63,7 @@ public class SessionProperties extends Properties<CDOSession>
});
add(new Property<CDOSession>("userID", Messages.getString("SessionPropertyTester_4"), //
- Messages.getString("SessionPropertyTester_5"), //$NON-NLS-1$
+ Messages.getString("SessionPropertyTester_5"), //$NON-NLS-1$
CATEGORY_SESSION)
{
@Override
@@ -190,6 +194,17 @@ public class SessionProperties extends Properties<CDOSession>
}
});
+ add(new Property<CDOSession>("serializeCommits", Messages.getString("SessionPropertyTester_38"), //
+ Messages.getString("SessionPropertyTester_39"), //$NON-NLS-1$
+ CATEGORY_REPOSITORY)
+ {
+ @Override
+ protected Object eval(CDOSession session)
+ {
+ return session.getRepositoryInfo().isSerializingCommits();
+ }
+ });
+
add(new Property<CDOSession>("ensureReferentialIntegrity", Messages.getString("SessionPropertyTester_30"), //
Messages.getString("SessionPropertyTester_31"), //$NON-NLS-1$
CATEGORY_REPOSITORY)
@@ -246,6 +261,81 @@ public class SessionProperties extends Properties<CDOSession>
});
}
+ public long getTimeStamp()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getName()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getUUID()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Type getType()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public State getState()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public long getCreationTime()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String getStoreType()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Set<ObjectType> getObjectIDTypes()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public IDGenerationLocation getIDGenerationLocation()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public CDOID getRootResourceID()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isSupportingAudits()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isSupportingBranches()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isSupportingEcore()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isSerializingCommits()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isEnsuringReferentialIntegrity()
+ {
+ throw new UnsupportedOperationException();
+ }
+
public static void main(String[] args)
{
new Tester().dumpContributionMarkup();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java
index 0dca09a88e..bb4bd3f63d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java
@@ -328,6 +328,8 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo
private boolean repositorySupportingEcore;
+ private boolean repositorySerializingCommits;
+
private boolean repositoryEnsuringReferentialIntegrity;
private List<InternalCDOPackageUnit> packageUnits = new ArrayList<InternalCDOPackageUnit>();
@@ -335,13 +337,14 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo
private IDGenerationLocation repositoryIDGenerationLocation;
/**
- * @since 4.1
+ * @since 4.2
*/
public OpenSessionResult(int sessionID, String userID, String repositoryUUID,
CDOCommonRepository.Type repositoryType, CDOCommonRepository.State repositoryState, String storeType,
Set<CDOID.ObjectType> objectIDTypes, long repositoryCreationTime, long lastUpdateTime, CDOID rootResourceID,
boolean repositorySupportingAudits, boolean repositorySupportingBranches, boolean repositorySupportingEcore,
- boolean repositoryEnsuringReferentialIntegrity, IDGenerationLocation repositoryIDGenerationLocation)
+ boolean repositorySerializingCommits, boolean repositoryEnsuringReferentialIntegrity,
+ IDGenerationLocation repositoryIDGenerationLocation)
{
this.sessionID = sessionID;
this.userID = userID;
@@ -356,6 +359,7 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo
this.repositorySupportingAudits = repositorySupportingAudits;
this.repositorySupportingBranches = repositorySupportingBranches;
this.repositorySupportingEcore = repositorySupportingEcore;
+ this.repositorySerializingCommits = repositoryEnsuringReferentialIntegrity;
this.repositoryEnsuringReferentialIntegrity = repositoryEnsuringReferentialIntegrity;
this.repositoryIDGenerationLocation = repositoryIDGenerationLocation;
}
@@ -445,6 +449,14 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader, BranchLo
}
/**
+ * @since 4.2
+ */
+ public boolean isRepositorySerializingCommits()
+ {
+ return repositorySerializingCommits;
+ }
+
+ /**
* @since 4.0
*/
public boolean isRepositoryEnsuringReferentialIntegrity()

Back to the top