Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2009-01-10 07:55:56 -0500
committerEike Stepper2009-01-10 07:55:56 -0500
commit0fc3329e8eab3e81cb9db55426c32a68e2af74bb (patch)
tree82fa369e10cee2c06e1603ab1158d80f59cc9ba9
parent07c186bae14ded6ef84d9610353549a5af085c1c (diff)
downloadcdo-0fc3329e8eab3e81cb9db55426c32a68e2af74bb.tar.gz
cdo-0fc3329e8eab3e81cb9db55426c32a68e2af74bb.tar.xz
cdo-0fc3329e8eab3e81cb9db55426c32a68e2af74bb.zip
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/.settings/.api_filters2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CDOClientProtocol.java12
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CDOTimeRequest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionCancelRequest.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase1Request.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase2Request.java13
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase3Request.java9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionRequest.java3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionResult.java92
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/OpenSessionRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/OpenSessionResult.java122
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/RepositoryTimeRequest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/RepositoryTimeResult.java93
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/AbstractSavepoint.java (renamed from plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOAbstractSavepoint.java)14
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSavepointImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java (renamed from plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategy.java)13
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java (renamed from plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionCommitContext.java)11
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXASavepointImpl.java (renamed from plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXASavepoint.java)4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java49
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java277
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOTransactionStrategy.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOCommitContext.java31
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java17
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOXATransaction.java44
28 files changed, 417 insertions, 425 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java
index b0769448b1..b6e723b2cf 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/StateMachineTest.java
@@ -24,13 +24,13 @@ import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.internal.cdo.CDOStateMachine;
-import org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionResult;
import org.eclipse.net4j.util.io.IOUtil;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.spi.cdo.InternalCDOObject;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
diff --git a/plugins/org.eclipse.emf.cdo/.settings/.api_filters b/plugins/org.eclipse.emf.cdo/.settings/.api_filters
index 860b4e2582..77aa9a2d76 100644
--- a/plugins/org.eclipse.emf.cdo/.settings/.api_filters
+++ b/plugins/org.eclipse.emf.cdo/.settings/.api_filters
@@ -27,7 +27,7 @@
</message_arguments>
</filter>
</resource>
- <resource path="src/org/eclipse/emf/internal/cdo/CDOXATransactionCommitContext.java" type="org.eclipse.emf.internal.cdo.transaction.CDOXATransactionCommitContext">
+ <resource path="src/org/eclipse/emf/internal/cdo/CDOXATransactionCommitContext.java" type="org.eclipse.emf.internal.cdo.transaction.CDOXACommitContextImpl">
<filter id="643846161">
<message_arguments>
<message_argument value="CommitTransactionResult"/>
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
index ffabd01e40..dc1ebb9f0d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
@@ -24,7 +24,6 @@ import org.eclipse.emf.cdo.util.InvalidObjectException;
import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionResult;
import org.eclipse.emf.internal.cdo.session.CDORevisionManagerImpl;
import org.eclipse.emf.internal.cdo.util.FSMUtil;
@@ -41,6 +40,7 @@ import org.eclipse.emf.spi.cdo.InternalCDOObject;
import org.eclipse.emf.spi.cdo.InternalCDOSession;
import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
import org.eclipse.emf.spi.cdo.InternalCDOView;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CDOClientProtocol.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CDOClientProtocol.java
index c58e6cee3f..91d0cc2daa 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CDOClientProtocol.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CDOClientProtocol.java
@@ -26,7 +26,6 @@ import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.internal.cdo.bundle.OM;
import org.eclipse.emf.internal.cdo.query.CDOAbstractQueryIteratorImpl;
import org.eclipse.emf.internal.cdo.session.CDORevisionManagerImpl;
-import org.eclipse.emf.internal.cdo.transaction.CDOXATransactionCommitContext;
import org.eclipse.net4j.signal.RemoteException;
import org.eclipse.net4j.signal.RequestWithConfirmation;
@@ -37,8 +36,9 @@ import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.trace.PerfTracer;
import org.eclipse.emf.spi.cdo.CDOSessionProtocol;
-import org.eclipse.emf.spi.cdo.InternalCDOCommitContext;
import org.eclipse.emf.spi.cdo.InternalCDOObject;
+import org.eclipse.emf.spi.cdo.InternalCDOTransaction.InternalCDOCommitContext;
+import org.eclipse.emf.spi.cdo.InternalCDOXATransaction.InternalCDOXACommitContext;
import java.io.File;
import java.util.Collection;
@@ -210,22 +210,22 @@ public class CDOClientProtocol extends CDOProtocolImpl implements CDOSessionProt
return send(new CommitTransactionRequest(this, commitContext), monitor);
}
- public CommitTransactionResult commitTransactionPhase1(CDOXATransactionCommitContext xaContext, OMMonitor monitor)
+ public CommitTransactionResult commitTransactionPhase1(InternalCDOXACommitContext xaContext, OMMonitor monitor)
{
return send(new CommitTransactionPhase1Request(this, xaContext), monitor);
}
- public CommitTransactionResult commitTransactionPhase2(CDOXATransactionCommitContext xaContext, OMMonitor monitor)
+ public CommitTransactionResult commitTransactionPhase2(InternalCDOXACommitContext xaContext, OMMonitor monitor)
{
return send(new CommitTransactionPhase2Request(this, xaContext), monitor);
}
- public CommitTransactionResult commitTransactionPhase3(CDOXATransactionCommitContext xaContext, OMMonitor monitor)
+ public CommitTransactionResult commitTransactionPhase3(InternalCDOXACommitContext xaContext, OMMonitor monitor)
{
return send(new CommitTransactionPhase3Request(this, xaContext), monitor);
}
- public CommitTransactionResult commitTransactionCancel(CDOXATransactionCommitContext xaContext, OMMonitor monitor)
+ public CommitTransactionResult commitTransactionCancel(InternalCDOXACommitContext xaContext, OMMonitor monitor)
{
return send(new CommitTransactionCancelRequest(this, xaContext), monitor);
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CDOTimeRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CDOTimeRequest.java
index e0ce3d89f5..3430f4a36a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CDOTimeRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CDOTimeRequest.java
@@ -17,6 +17,8 @@ import org.eclipse.emf.internal.cdo.bundle.OM;
import org.eclipse.net4j.util.om.trace.ContextTracer;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.RepositoryTimeResult;
+
import java.io.IOException;
/**
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionCancelRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionCancelRequest.java
index d490713108..87313f3257 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionCancelRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionCancelRequest.java
@@ -15,10 +15,11 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.internal.cdo.transaction.CDOXATransactionCommitContext;
-
import org.eclipse.net4j.util.om.monitor.OMMonitor;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
+import org.eclipse.emf.spi.cdo.InternalCDOXATransaction.InternalCDOXACommitContext;
+
import java.io.IOException;
/**
@@ -32,7 +33,7 @@ import java.io.IOException;
*/
public class CommitTransactionCancelRequest extends CommitTransactionRequest
{
- public CommitTransactionCancelRequest(CDOClientProtocol protocol, CDOXATransactionCommitContext xaContext)
+ public CommitTransactionCancelRequest(CDOClientProtocol protocol, InternalCDOXACommitContext xaContext)
{
super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_CANCEL, xaContext);
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase1Request.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase1Request.java
index ec3bdfc2e2..904ebb7c2c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase1Request.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase1Request.java
@@ -15,10 +15,11 @@ import org.eclipse.emf.cdo.common.io.CDODataInput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.internal.cdo.transaction.CDOXATransactionCommitContext;
-
import org.eclipse.net4j.util.om.monitor.OMMonitor;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
+import org.eclipse.emf.spi.cdo.InternalCDOXATransaction.InternalCDOXACommitContext;
+
import java.io.IOException;
/**
@@ -31,7 +32,7 @@ import java.io.IOException;
*/
public class CommitTransactionPhase1Request extends CommitTransactionRequest
{
- public CommitTransactionPhase1Request(CDOClientProtocol protocol, CDOXATransactionCommitContext xaContext)
+ public CommitTransactionPhase1Request(CDOClientProtocol protocol, InternalCDOXACommitContext xaContext)
{
super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE1, xaContext);
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase2Request.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase2Request.java
index 78c4af57b5..37c295dd97 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase2Request.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase2Request.java
@@ -19,13 +19,14 @@ import org.eclipse.emf.cdo.internal.common.id.CDOIDExternalTempImpl;
import org.eclipse.emf.cdo.util.CDOURIUtil;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.emf.internal.cdo.transaction.CDOXATransactionCommitContext;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
+import org.eclipse.emf.spi.cdo.InternalCDOXATransaction.InternalCDOXACommitContext;
import java.io.IOException;
import java.util.Map;
@@ -44,15 +45,15 @@ public class CommitTransactionPhase2Request extends CommitTransactionRequest
private static final ContextTracer PROTOCOL = new ContextTracer(OM.DEBUG_PROTOCOL,
CommitTransactionPhase1Request.class);
- public CommitTransactionPhase2Request(CDOClientProtocol protocol, CDOXATransactionCommitContext xaContext)
+ public CommitTransactionPhase2Request(CDOClientProtocol protocol, InternalCDOXACommitContext xaContext)
{
super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE2, xaContext);
}
@Override
- protected CDOXATransactionCommitContext getCommitContext()
+ protected InternalCDOXACommitContext getCommitContext()
{
- return (CDOXATransactionCommitContext)super.getCommitContext();
+ return (InternalCDOXACommitContext)super.getCommitContext();
}
@Override
@@ -73,7 +74,7 @@ public class CommitTransactionPhase2Request extends CommitTransactionRequest
*/
protected void requestingIdMapping(CDODataOutput out) throws IOException
{
- CDOXATransactionCommitContext context = getCommitContext();
+ InternalCDOXACommitContext context = getCommitContext();
Map<CDOIDExternalTempImpl, InternalCDOTransaction> requestedIDs = context.getRequestedIDs();
int size = requestedIDs.size();
out.writeInt(size);
@@ -88,7 +89,7 @@ public class CommitTransactionPhase2Request extends CommitTransactionRequest
URI oldURIExternal = URI.createURI(tempID.toURIFragment());
CDOID oldCDOID = CDOIDUtil.read(oldURIExternal.fragment(), null);
- CDOXATransactionCommitContext commitContext = context.getTransactionManager().getCommitContext(entry.getValue());
+ InternalCDOXACommitContext commitContext = context.getTransactionManager().getCommitContext(entry.getValue());
if (commitContext == null)
{
throw new IllegalStateException("Missing informations. " + entry.getValue() + " isn't involved in the commit.");
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase3Request.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase3Request.java
index 0bd908d98d..c63da59f6b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase3Request.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionPhase3Request.java
@@ -15,10 +15,11 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.internal.cdo.transaction.CDOXATransactionCommitContext;
-
import org.eclipse.net4j.util.om.monitor.OMMonitor;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
+import org.eclipse.emf.spi.cdo.InternalCDOXATransaction.InternalCDOXACommitContext;
+
import java.io.IOException;
/**
@@ -32,7 +33,7 @@ import java.io.IOException;
*/
public class CommitTransactionPhase3Request extends CommitTransactionRequest
{
- public CommitTransactionPhase3Request(CDOClientProtocol protocol, CDOXATransactionCommitContext xaContext)
+ public CommitTransactionPhase3Request(CDOClientProtocol protocol, InternalCDOXACommitContext xaContext)
{
super(protocol, CDOProtocolConstants.SIGNAL_COMMIT_TRANSACTION_PHASE3, xaContext);
}
@@ -52,7 +53,7 @@ public class CommitTransactionPhase3Request extends CommitTransactionRequest
return result;
}
- CDOXATransactionCommitContext context = (CDOXATransactionCommitContext)getCommitContext();
+ InternalCDOXACommitContext context = (InternalCDOXACommitContext)getCommitContext();
confirmingNewPackage(in, context.getResult());
return context.getResult();
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionRequest.java
index 58d7fbc925..271cb48dad 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionRequest.java
@@ -46,8 +46,9 @@ import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.trace.ContextTracer;
-import org.eclipse.emf.spi.cdo.InternalCDOCommitContext;
import org.eclipse.emf.spi.cdo.InternalCDOSession;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
+import org.eclipse.emf.spi.cdo.InternalCDOTransaction.InternalCDOCommitContext;
import java.io.IOException;
import java.util.Collection;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionResult.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionResult.java
deleted file mode 100644
index c34fb0ad77..0000000000
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/CommitTransactionResult.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * 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.net4j.protocol;
-
-import org.eclipse.emf.cdo.common.id.CDOID;
-import org.eclipse.emf.cdo.common.id.CDOIDTemp;
-import org.eclipse.emf.cdo.common.revision.CDOReferenceAdjuster;
-import org.eclipse.emf.cdo.internal.common.revision.CDOIDMapper;
-
-import org.eclipse.emf.internal.cdo.revision.CDOPostCommitReferenceAdjuster;
-
-import org.eclipse.emf.spi.cdo.InternalCDOCommitContext;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Eike Stepper
- */
-public final class CommitTransactionResult
-{
- private String rollbackMessage;
-
- private long timeStamp;
-
- private Map<CDOIDTemp, CDOID> idMappings = new HashMap<CDOIDTemp, CDOID>();
-
- private CDOReferenceAdjuster referenceAdjuster;
-
- private InternalCDOCommitContext commitContext;
-
- public CommitTransactionResult(InternalCDOCommitContext commitContext, String rollbackMessage)
- {
- this.rollbackMessage = rollbackMessage;
- this.commitContext = commitContext;
- }
-
- public CommitTransactionResult(InternalCDOCommitContext commitContext, long timeStamp)
- {
- this.timeStamp = timeStamp;
- this.commitContext = commitContext;
- }
-
- public CDOReferenceAdjuster getReferenceAdjuster()
- {
- if (referenceAdjuster == null)
- {
- referenceAdjuster = new CDOPostCommitReferenceAdjuster(commitContext.getTransaction(),
- new CDOIDMapper(idMappings));
- }
-
- return referenceAdjuster;
- }
-
- public void setReferenceAdjuster(CDOReferenceAdjuster referenceAdjuster)
- {
- this.referenceAdjuster = referenceAdjuster;
- }
-
- public InternalCDOCommitContext getCommitContext()
- {
- return commitContext;
- }
-
- public String getRollbackMessage()
- {
- return rollbackMessage;
- }
-
- public long getTimeStamp()
- {
- return timeStamp;
- }
-
- public Map<CDOIDTemp, CDOID> getIDMappings()
- {
- return idMappings;
- }
-
- void addIDMapping(CDOIDTemp oldID, CDOID newID)
- {
- idMappings.put(oldID, newID);
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/OpenSessionRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/OpenSessionRequest.java
index 2d8dbdd6e7..3bb51f82e1 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/OpenSessionRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/OpenSessionRequest.java
@@ -28,6 +28,7 @@ import org.eclipse.emf.internal.cdo.session.CDOSessionPackageManagerImpl;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.spi.cdo.InternalCDOSession;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.OpenSessionResult;
import java.io.IOException;
import java.text.MessageFormat;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/OpenSessionResult.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/OpenSessionResult.java
deleted file mode 100644
index 7248a280d1..0000000000
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/OpenSessionResult.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * 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.net4j.protocol;
-
-import org.eclipse.emf.cdo.common.id.CDOIDLibraryDescriptor;
-import org.eclipse.emf.cdo.common.id.CDOIDMetaRange;
-import org.eclipse.emf.cdo.common.model.CDOPackageInfo;
-import org.eclipse.emf.cdo.common.model.CDOPackageURICompressor;
-
-import org.eclipse.net4j.util.io.ExtendedDataInput;
-import org.eclipse.net4j.util.io.ExtendedDataOutput;
-import org.eclipse.net4j.util.io.StringCompressor;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Eike Stepper
- */
-public final class OpenSessionResult implements CDOPackageURICompressor
-{
- private int sessionID;
-
- private String repositoryUUID;
-
- private long repositoryCreationTime;
-
- private RepositoryTimeResult repositoryTimeResult;
-
- private boolean repositorySupportingAudits;
-
- private CDOIDLibraryDescriptor libraryDescriptor;
-
- private List<CDOPackageInfo> packageInfos = new ArrayList<CDOPackageInfo>();
-
- private StringCompressor compressor = new StringCompressor(true);
-
- public OpenSessionResult(int sessionID, String repositoryUUID, long repositoryCreationTime,
- boolean repositorySupportingAudits, CDOIDLibraryDescriptor libraryDescriptor)
- {
- this.sessionID = sessionID;
- this.repositoryUUID = repositoryUUID;
- this.repositoryCreationTime = repositoryCreationTime;
- this.repositorySupportingAudits = repositorySupportingAudits;
- this.libraryDescriptor = libraryDescriptor;
- }
-
- public int getSessionID()
- {
- return sessionID;
- }
-
- public String getRepositoryUUID()
- {
- return repositoryUUID;
- }
-
- public long getRepositoryCreationTime()
- {
- return repositoryCreationTime;
- }
-
- public boolean isRepositorySupportingAudits()
- {
- return repositorySupportingAudits;
- }
-
- public RepositoryTimeResult getRepositoryTimeResult()
- {
- return repositoryTimeResult;
- }
-
- public void setRepositoryTimeResult(RepositoryTimeResult repositoryTimeResult)
- {
- this.repositoryTimeResult = repositoryTimeResult;
- }
-
- public CDOIDLibraryDescriptor getLibraryDescriptor()
- {
- return libraryDescriptor;
- }
-
- public List<CDOPackageInfo> getPackageInfos()
- {
- return packageInfos;
- }
-
- void addPackageInfo(String packageURI, boolean dynamic, CDOIDMetaRange metaIDRange, String parentURI)
- {
- packageInfos.add(new CDOPackageInfo(packageURI, dynamic, metaIDRange, parentURI));
- }
-
- public StringCompressor getCompressor()
- {
- return compressor;
- }
-
- /**
- * @since 2.0
- */
- public void writePackageURI(ExtendedDataOutput out, String uri) throws IOException
- {
- compressor.write(out, uri);
- }
-
- /**
- * @since 2.0
- */
- public String readPackageURI(ExtendedDataInput in) throws IOException
- {
- return compressor.read(in);
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/RepositoryTimeRequest.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/RepositoryTimeRequest.java
index 523e35ea1c..ab9466aaf5 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/RepositoryTimeRequest.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/RepositoryTimeRequest.java
@@ -13,6 +13,8 @@ package org.eclipse.emf.internal.cdo.net4j.protocol;
import org.eclipse.emf.cdo.common.io.CDODataInput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.RepositoryTimeResult;
+
import java.io.IOException;
/**
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/RepositoryTimeResult.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/RepositoryTimeResult.java
deleted file mode 100644
index 1d30e95eaf..0000000000
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/net4j/protocol/RepositoryTimeResult.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * 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.net4j.protocol;
-
-import java.text.MessageFormat;
-
-/**
- * @author Eike Stepper
- */
-public final class RepositoryTimeResult
-{
- private long requested;
-
- private long indicated;
-
- private long responded;
-
- private long confirmed;
-
- public RepositoryTimeResult()
- {
- }
-
- public long getRequested()
- {
- return requested;
- }
-
- public void setRequested(long requested)
- {
- this.requested = requested;
- }
-
- public long getIndicated()
- {
- return indicated;
- }
-
- public void setIndicated(long indicated)
- {
- this.indicated = indicated;
- }
-
- public long getResponded()
- {
- return responded;
- }
-
- public void setResponded(long responded)
- {
- this.responded = responded;
- }
-
- public long getConfirmed()
- {
- return confirmed;
- }
-
- public void setConfirmed(long confirmed)
- {
- this.confirmed = confirmed;
- }
-
- public long getAproximateRepositoryOffset()
- {
- long latency = confirmed - requested >> 1;
- long shift = confirmed - responded;
- return shift - latency;
- }
-
- public long getAproximateRepositoryTime()
- {
- long offset = getAproximateRepositoryOffset();
- return System.currentTimeMillis() + offset;
- }
-
- @Override
- public String toString()
- {
- return MessageFormat
- .format(
- "RepositoryTime[requested={0,date} {0,time}, indicated={1,date} {1,time}, responded={2,date} {2,time}, confirmed={3,date} {3,time}]",
- requested, indicated, responded, confirmed);
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
index cd2a989d21..0936b6d079 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
@@ -43,8 +43,6 @@ import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.emf.internal.cdo.net4j.protocol.OpenSessionResult;
-import org.eclipse.emf.internal.cdo.net4j.protocol.RepositoryTimeResult;
import org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl;
import org.eclipse.emf.internal.cdo.util.ModelUtil;
import org.eclipse.emf.internal.cdo.view.CDOAuditImpl;
@@ -76,6 +74,8 @@ import org.eclipse.emf.spi.cdo.InternalCDOSession;
import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
import org.eclipse.emf.spi.cdo.InternalCDOView;
import org.eclipse.emf.spi.cdo.InternalCDOViewSet;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.OpenSessionResult;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.RepositoryTimeResult;
import java.io.File;
import java.io.IOException;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOAbstractSavepoint.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/AbstractSavepoint.java
index da1bb7e5c3..ad4c1b8df2 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOAbstractSavepoint.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/AbstractSavepoint.java
@@ -18,15 +18,15 @@ import org.eclipse.emf.cdo.transaction.CDOUserTransaction;
* @author Simon McDuff
* @since 2.0
*/
-public abstract class CDOAbstractSavepoint implements CDOSavepoint
+public abstract class AbstractSavepoint implements CDOSavepoint
{
private CDOUserTransaction userTransaction;
- private CDOAbstractSavepoint previousSavepoint;
+ private AbstractSavepoint previousSavepoint;
- private CDOAbstractSavepoint nextSavepoint;
+ private AbstractSavepoint nextSavepoint;
- public CDOAbstractSavepoint(CDOUserTransaction transaction, CDOAbstractSavepoint lastSavepoint)
+ public AbstractSavepoint(CDOUserTransaction transaction, AbstractSavepoint lastSavepoint)
{
userTransaction = transaction;
previousSavepoint = lastSavepoint;
@@ -36,12 +36,12 @@ public abstract class CDOAbstractSavepoint implements CDOSavepoint
}
}
- public void setPreviousSavepoint(CDOAbstractSavepoint previousSavepoint)
+ public void setPreviousSavepoint(AbstractSavepoint previousSavepoint)
{
this.previousSavepoint = previousSavepoint;
}
- public void setNextSavepoint(CDOAbstractSavepoint nextSavepoint)
+ public void setNextSavepoint(AbstractSavepoint nextSavepoint)
{
this.nextSavepoint = nextSavepoint;
}
@@ -56,7 +56,7 @@ public abstract class CDOAbstractSavepoint implements CDOSavepoint
return previousSavepoint;
}
- public CDOAbstractSavepoint getFirstSavePoint()
+ public AbstractSavepoint getFirstSavePoint()
{
return previousSavepoint != null ? previousSavepoint.getFirstSavePoint() : this;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSavepointImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSavepointImpl.java
index f1edf03e9f..559933a30b 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSavepointImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSavepointImpl.java
@@ -39,7 +39,7 @@ import java.util.concurrent.ConcurrentMap;
* @author Simon McDuff
* @since 2.0
*/
-public class CDOSavepointImpl extends CDOAbstractSavepoint
+public class CDOSavepointImpl extends AbstractSavepoint
{
private Map<CDOID, CDOResource> newResources = new HashMap<CDOID, CDOResource>();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategy.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java
index b3a14456f1..afc2bc7b8e 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategy.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOSingleTransactionStrategyImpl.java
@@ -13,7 +13,6 @@ package org.eclipse.emf.internal.cdo.transaction;
import org.eclipse.emf.cdo.transaction.CDOSavepoint;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionResult;
import org.eclipse.net4j.util.om.monitor.EclipseMonitor;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
@@ -21,8 +20,9 @@ import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.transaction.TransactionException;
import org.eclipse.emf.spi.cdo.CDOTransactionStrategy;
-import org.eclipse.emf.spi.cdo.InternalCDOCommitContext;
import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
+import org.eclipse.emf.spi.cdo.InternalCDOTransaction.InternalCDOCommitContext;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -30,13 +30,14 @@ import org.eclipse.core.runtime.IProgressMonitor;
* @author Simon McDuff
* @since 2.0
*/
-public class CDOSingleTransactionStrategy implements CDOTransactionStrategy
+public class CDOSingleTransactionStrategyImpl implements CDOTransactionStrategy
{
- public static final CDOSingleTransactionStrategy INSTANCE = new CDOSingleTransactionStrategy();
+ public static final CDOSingleTransactionStrategyImpl INSTANCE = new CDOSingleTransactionStrategyImpl();
- private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_TRANSCTION, CDOSingleTransactionStrategy.class);
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_TRANSCTION,
+ CDOSingleTransactionStrategyImpl.class);
- public CDOSingleTransactionStrategy()
+ public CDOSingleTransactionStrategyImpl()
{
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
index 180cb3331b..b5ccb0f8fd 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
@@ -45,7 +45,6 @@ import org.eclipse.emf.cdo.view.CDOViewResourcesEvent;
import org.eclipse.emf.internal.cdo.CDOObjectMerger;
import org.eclipse.emf.internal.cdo.CDOStateMachine;
import org.eclipse.emf.internal.cdo.bundle.OM;
-import org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionResult;
import org.eclipse.emf.internal.cdo.session.CDOSessionPackageManagerImpl;
import org.eclipse.emf.internal.cdo.util.CompletePackageClosure;
import org.eclipse.emf.internal.cdo.util.FSMUtil;
@@ -64,10 +63,10 @@ import org.eclipse.net4j.util.transaction.TransactionException;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.spi.cdo.CDOTransactionStrategy;
-import org.eclipse.emf.spi.cdo.InternalCDOCommitContext;
import org.eclipse.emf.spi.cdo.InternalCDOObject;
import org.eclipse.emf.spi.cdo.InternalCDOSession;
import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionCommitContext.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java
index 84f2a8670c..b2aca39d28 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXACommitContextImpl.java
@@ -12,7 +12,6 @@ package org.eclipse.emf.internal.cdo.transaction;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.id.CDOID;
-import org.eclipse.emf.cdo.common.id.CDOIDProvider;
import org.eclipse.emf.cdo.common.model.CDOPackage;
import org.eclipse.emf.cdo.common.revision.CDOReferenceAdjuster;
import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
@@ -20,28 +19,28 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.internal.common.id.CDOIDExternalTempImpl;
import org.eclipse.emf.cdo.util.CDOUtil;
-import org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionResult;
import org.eclipse.emf.internal.cdo.transaction.CDOXATransactionImpl.CDOXAState;
import org.eclipse.net4j.util.ImplementationError;
import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.spi.cdo.InternalCDOCommitContext;
import org.eclipse.emf.spi.cdo.InternalCDOObject;
import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
+import org.eclipse.emf.spi.cdo.InternalCDOTransaction.InternalCDOCommitContext;
+import org.eclipse.emf.spi.cdo.InternalCDOXATransaction.InternalCDOXACommitContext;
import org.eclipse.core.runtime.IProgressMonitor;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.concurrent.Callable;
/**
* @author Simon McDuff
* @since 2.0
*/
-public class CDOXATransactionCommitContext implements Callable<Object>, CDOIDProvider, InternalCDOCommitContext
+public class CDOXACommitContextImpl implements InternalCDOXACommitContext
{
private CDOXATransactionImpl transactionManager;
@@ -57,7 +56,7 @@ public class CDOXATransactionCommitContext implements Callable<Object>, CDOIDPro
private Map<InternalCDOObject, CDOIDExternalTempImpl> objectToID = new HashMap<InternalCDOObject, CDOIDExternalTempImpl>();
- public CDOXATransactionCommitContext(CDOXATransactionImpl manager, InternalCDOCommitContext commitContext)
+ public CDOXACommitContextImpl(CDOXATransactionImpl manager, InternalCDOCommitContext commitContext)
{
transactionManager = manager;
delegateCommitContext = commitContext;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXASavepoint.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXASavepointImpl.java
index 8d8d319ac3..575d258511 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXASavepoint.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXASavepointImpl.java
@@ -19,11 +19,11 @@ import java.util.List;
* @author Simon McDuff
* @since 2.0
*/
-public class CDOXASavepoint extends CDOAbstractSavepoint
+public class CDOXASavepointImpl extends AbstractSavepoint
{
private List<CDOSavepoint> savepoints;
- public CDOXASavepoint(CDOUserTransaction transaction, CDOAbstractSavepoint lastSavepoint)
+ public CDOXASavepointImpl(CDOUserTransaction transaction, AbstractSavepoint lastSavepoint)
{
super(transaction, lastSavepoint);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java
index 6538d85d11..10c0a9871e 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOXATransactionImpl.java
@@ -18,8 +18,6 @@ import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.cdo.view.CDOViewSet;
-import org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionResult;
-
import org.eclipse.net4j.util.CheckUtil;
import org.eclipse.net4j.util.om.monitor.EclipseMonitor;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
@@ -31,8 +29,10 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.spi.cdo.CDOSessionProtocol;
import org.eclipse.emf.spi.cdo.CDOTransactionStrategy;
-import org.eclipse.emf.spi.cdo.InternalCDOCommitContext;
import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
+import org.eclipse.emf.spi.cdo.InternalCDOXATransaction;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
+import org.eclipse.emf.spi.cdo.InternalCDOTransaction.InternalCDOCommitContext;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -81,7 +81,7 @@ import java.util.concurrent.TimeoutException;
* @author Simon McDuff
* @since 2.0
*/
-public class CDOXATransactionImpl implements CDOXATransaction
+public class CDOXATransactionImpl implements InternalCDOXATransaction
{
private List<InternalCDOTransaction> transactions = new ArrayList<InternalCDOTransaction>();
@@ -89,13 +89,13 @@ public class CDOXATransactionImpl implements CDOXATransaction
private ExecutorService executorService = Executors.newFixedThreadPool(10);
- private Map<InternalCDOTransaction, CDOXATransactionCommitContext> activeContext = new HashMap<InternalCDOTransaction, CDOXATransactionCommitContext>();
+ private Map<InternalCDOTransaction, CDOXACommitContextImpl> activeContext = new HashMap<InternalCDOTransaction, CDOXACommitContextImpl>();
private Map<InternalCDOTransaction, Set<CDOID>> requestedCDOID = new HashMap<InternalCDOTransaction, Set<CDOID>>();
- private CDOXASavepoint lastSavepoint = new CDOXASavepoint(this, null);
+ private CDOXASavepointImpl lastSavepoint = new CDOXASavepointImpl(this, null);
- private CDOXASavepoint firstSavepoint = lastSavepoint;
+ private CDOXASavepointImpl firstSavepoint = lastSavepoint;
private CDOTransactionStrategy transactionStrategy = new CDOXATransactionStrategyImpl();
@@ -178,12 +178,12 @@ public class CDOXATransactionImpl implements CDOXATransaction
return ids.toArray(new CDOID[ids.size()]);
}
- public CDOXATransactionCommitContext getCommitContext(CDOTransaction transaction)
+ public CDOXACommitContextImpl getCommitContext(CDOTransaction transaction)
{
return activeContext.get(transaction);
}
- private void send(Collection<CDOXATransactionCommitContext> xaContexts, final IProgressMonitor progressMonitor)
+ private void send(Collection<CDOXACommitContextImpl> xaContexts, final IProgressMonitor progressMonitor)
throws InterruptedException, ExecutionException
{
progressMonitor.beginTask("", xaContexts.size());
@@ -191,7 +191,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
try
{
List<Future<Object>> futures = new ArrayList<Future<Object>>();
- for (CDOXATransactionCommitContext xaContext : xaContexts)
+ for (CDOXACommitContextImpl xaContext : xaContexts)
{
xaContext.setProgressMonitor(new SynchonizedSubProgressMonitor(progressMonitor, 1));
futures.add(executorService.submit(xaContext));
@@ -217,7 +217,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
finally
{
progressMonitor.done();
- for (CDOXATransactionCommitContext xaContext : xaContexts)
+ for (CDOXACommitContextImpl xaContext : xaContexts)
{
xaContext.setProgressMonitor(null);
}
@@ -258,7 +258,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
for (InternalCDOTransaction transaction : transactions)
{
InternalCDOCommitContext context = transaction.createCommitContext();
- CDOXATransactionCommitContext xaContext = new CDOXATransactionCommitContext(this, context);
+ CDOXACommitContextImpl xaContext = new CDOXACommitContextImpl(this, context);
xaContext.setState(CDOXAPhase1State.INSTANCE);
activeContext.put(transaction, xaContext);
}
@@ -277,7 +277,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
if (phase < 2)
{
// Phase 0 and 1 are the only two phases we can cancel.
- for (CDOXATransactionCommitContext transaction : activeContext.values())
+ for (CDOXACommitContextImpl transaction : activeContext.values())
{
transaction.setState(CDOXACancel.INSTANCE);
}
@@ -303,7 +303,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
}
}
- public CDOXASavepoint getLastSavepoint()
+ public CDOXASavepointImpl getLastSavepoint()
{
return lastSavepoint;
}
@@ -330,7 +330,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
throw new IllegalArgumentException("Savepoint isn't valid : " + savepoint);
}
- CDOXASavepoint savepointSet = (CDOXASavepoint)savepoint;
+ CDOXASavepointImpl savepointSet = (CDOXASavepointImpl)savepoint;
List<CDOSavepoint> savepoints = savepointSet.getSavepoints();
if (savepoints == null)
{
@@ -340,7 +340,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
for (CDOSavepoint indexSavePoint : savepoints)
{
InternalCDOTransaction transaction = (InternalCDOTransaction)indexSavePoint.getUserTransaction();
- CDOSingleTransactionStrategy.INSTANCE.rollback(transaction, indexSavePoint);
+ CDOSingleTransactionStrategyImpl.INSTANCE.rollback(transaction, indexSavePoint);
}
lastSavepoint = savepointSet;
@@ -354,11 +354,11 @@ public class CDOXATransactionImpl implements CDOXATransaction
for (CDOSavepoint savepoint : savepoints)
{
InternalCDOTransaction transaction = (InternalCDOTransaction)savepoint.getUserTransaction();
- CDOSingleTransactionStrategy.INSTANCE.setSavepoint(transaction);
+ CDOSingleTransactionStrategyImpl.INSTANCE.setSavepoint(transaction);
}
getLastSavepoint().setSavepoints(savepoints);
- lastSavepoint = new CDOXASavepoint(this, getLastSavepoint());
+ lastSavepoint = new CDOXASavepointImpl(this, getLastSavepoint());
return lastSavepoint;
}
@@ -436,7 +436,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
public static final CDOXAState DONE = new CDOXAState()
{
@Override
- protected void handle(CDOXATransactionCommitContext xaContext, IProgressMonitor progressMonitor) throws Exception
+ protected void handle(CDOXACommitContextImpl xaContext, IProgressMonitor progressMonitor) throws Exception
{
progressMonitor.done();
}
@@ -450,8 +450,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
}
}
- protected abstract void handle(CDOXATransactionCommitContext xaContext, IProgressMonitor progressMonitor)
- throws Exception;
+ protected abstract void handle(CDOXACommitContextImpl xaContext, IProgressMonitor progressMonitor) throws Exception;
};
/**
@@ -462,7 +461,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
public static final CDOXAPhase1State INSTANCE = new CDOXAPhase1State();
@Override
- protected void handle(CDOXATransactionCommitContext xaContext, IProgressMonitor progressMonitor) throws Exception
+ protected void handle(CDOXACommitContextImpl xaContext, IProgressMonitor progressMonitor) throws Exception
{
xaContext.preCommit();
CommitTransactionResult result = null;
@@ -491,7 +490,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
}
@Override
- protected void handle(CDOXATransactionCommitContext xaContext, IProgressMonitor progressMonitor) throws Exception
+ protected void handle(CDOXACommitContextImpl xaContext, IProgressMonitor progressMonitor) throws Exception
{
if (xaContext.getTransaction().isDirty())
{
@@ -517,7 +516,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
}
@Override
- protected void handle(CDOXATransactionCommitContext xaContext, IProgressMonitor progressMonitor) throws Exception
+ protected void handle(CDOXACommitContextImpl xaContext, IProgressMonitor progressMonitor) throws Exception
{
if (xaContext.getTransaction().isDirty())
{
@@ -543,7 +542,7 @@ public class CDOXATransactionImpl implements CDOXATransaction
}
@Override
- protected void handle(CDOXATransactionCommitContext xaContext, IProgressMonitor progressMonitor) throws Exception
+ protected void handle(CDOXACommitContextImpl xaContext, IProgressMonitor progressMonitor) throws Exception
{
CDOSessionProtocol sessionProtocol = xaContext.getTransaction().getSession().getSessionProtocol();
OMMonitor monitor = new EclipseMonitor(progressMonitor);
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 08ae06587c..49c4b18b76 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
@@ -12,24 +12,38 @@ package org.eclipse.emf.spi.cdo;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOIDLibraryDescriptor;
+import org.eclipse.emf.cdo.common.id.CDOIDMetaRange;
+import org.eclipse.emf.cdo.common.id.CDOIDTemp;
import org.eclipse.emf.cdo.common.model.CDOFeature;
import org.eclipse.emf.cdo.common.model.CDOPackage;
+import org.eclipse.emf.cdo.common.model.CDOPackageInfo;
+import org.eclipse.emf.cdo.common.model.CDOPackageURICompressor;
+import org.eclipse.emf.cdo.common.revision.CDOReferenceAdjuster;
import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.internal.common.revision.CDOIDMapper;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.emf.cdo.transaction.CDOTimeStampContext;
import org.eclipse.emf.cdo.view.CDOView;
-import org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionResult;
-import org.eclipse.emf.internal.cdo.net4j.protocol.OpenSessionResult;
-import org.eclipse.emf.internal.cdo.net4j.protocol.RepositoryTimeResult;
import org.eclipse.emf.internal.cdo.query.CDOAbstractQueryIteratorImpl;
-import org.eclipse.emf.internal.cdo.transaction.CDOXATransactionCommitContext;
+import org.eclipse.emf.internal.cdo.revision.CDOPostCommitReferenceAdjuster;
import org.eclipse.net4j.util.concurrent.RWLockManager.LockType;
+import org.eclipse.net4j.util.io.ExtendedDataInput;
+import org.eclipse.net4j.util.io.ExtendedDataOutput;
+import org.eclipse.net4j.util.io.StringCompressor;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
+import org.eclipse.emf.spi.cdo.InternalCDOTransaction.InternalCDOCommitContext;
+import org.eclipse.emf.spi.cdo.InternalCDOXATransaction.InternalCDOXACommitContext;
+
import java.io.File;
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -83,11 +97,258 @@ public interface CDOSessionProtocol
public CommitTransactionResult commitTransaction(InternalCDOCommitContext commitContext, OMMonitor monitor);
- public CommitTransactionResult commitTransactionPhase1(CDOXATransactionCommitContext xaContext, OMMonitor monitor);
+ public CommitTransactionResult commitTransactionPhase1(InternalCDOXACommitContext xaContext, OMMonitor monitor);
+
+ public CommitTransactionResult commitTransactionPhase2(InternalCDOXACommitContext xaContext, OMMonitor monitor);
+
+ public CommitTransactionResult commitTransactionPhase3(InternalCDOXACommitContext xaContext, OMMonitor monitor);
+
+ public CommitTransactionResult commitTransactionCancel(InternalCDOXACommitContext xaContext, OMMonitor monitor);
+
+ /**
+ * @author Eike Stepper
+ */
+ public final class OpenSessionResult implements CDOPackageURICompressor
+ {
+ private int sessionID;
+
+ private String repositoryUUID;
+
+ private long repositoryCreationTime;
+
+ private RepositoryTimeResult repositoryTimeResult;
+
+ private boolean repositorySupportingAudits;
+
+ private CDOIDLibraryDescriptor libraryDescriptor;
+
+ private List<CDOPackageInfo> packageInfos = new ArrayList<CDOPackageInfo>();
+
+ private StringCompressor compressor = new StringCompressor(true);
+
+ public OpenSessionResult(int sessionID, String repositoryUUID, long repositoryCreationTime,
+ boolean repositorySupportingAudits, CDOIDLibraryDescriptor libraryDescriptor)
+ {
+ this.sessionID = sessionID;
+ this.repositoryUUID = repositoryUUID;
+ this.repositoryCreationTime = repositoryCreationTime;
+ this.repositorySupportingAudits = repositorySupportingAudits;
+ this.libraryDescriptor = libraryDescriptor;
+ }
+
+ public int getSessionID()
+ {
+ return sessionID;
+ }
+
+ public String getRepositoryUUID()
+ {
+ return repositoryUUID;
+ }
+
+ public long getRepositoryCreationTime()
+ {
+ return repositoryCreationTime;
+ }
+
+ public boolean isRepositorySupportingAudits()
+ {
+ return repositorySupportingAudits;
+ }
+
+ public RepositoryTimeResult getRepositoryTimeResult()
+ {
+ return repositoryTimeResult;
+ }
+
+ public void setRepositoryTimeResult(RepositoryTimeResult repositoryTimeResult)
+ {
+ this.repositoryTimeResult = repositoryTimeResult;
+ }
+
+ public CDOIDLibraryDescriptor getLibraryDescriptor()
+ {
+ return libraryDescriptor;
+ }
+
+ public List<CDOPackageInfo> getPackageInfos()
+ {
+ return packageInfos;
+ }
+
+ public void addPackageInfo(String packageURI, boolean dynamic, CDOIDMetaRange metaIDRange, String parentURI)
+ {
+ packageInfos.add(new CDOPackageInfo(packageURI, dynamic, metaIDRange, parentURI));
+ }
+
+ public StringCompressor getCompressor()
+ {
+ return compressor;
+ }
+
+ /**
+ * @since 2.0
+ */
+ public void writePackageURI(ExtendedDataOutput out, String uri) throws IOException
+ {
+ compressor.write(out, uri);
+ }
+
+ /**
+ * @since 2.0
+ */
+ public String readPackageURI(ExtendedDataInput in) throws IOException
+ {
+ return compressor.read(in);
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public final class RepositoryTimeResult
+ {
+ private long requested;
+
+ private long indicated;
+
+ private long responded;
+
+ private long confirmed;
+
+ public RepositoryTimeResult()
+ {
+ }
+
+ public long getRequested()
+ {
+ return requested;
+ }
+
+ public void setRequested(long requested)
+ {
+ this.requested = requested;
+ }
+
+ public long getIndicated()
+ {
+ return indicated;
+ }
+
+ public void setIndicated(long indicated)
+ {
+ this.indicated = indicated;
+ }
+
+ public long getResponded()
+ {
+ return responded;
+ }
+
+ public void setResponded(long responded)
+ {
+ this.responded = responded;
+ }
+
+ public long getConfirmed()
+ {
+ return confirmed;
+ }
+
+ public void setConfirmed(long confirmed)
+ {
+ this.confirmed = confirmed;
+ }
+
+ public long getAproximateRepositoryOffset()
+ {
+ long latency = confirmed - requested >> 1;
+ long shift = confirmed - responded;
+ return shift - latency;
+ }
+
+ public long getAproximateRepositoryTime()
+ {
+ long offset = getAproximateRepositoryOffset();
+ return System.currentTimeMillis() + offset;
+ }
+
+ @Override
+ public String toString()
+ {
+ return MessageFormat
+ .format(
+ "RepositoryTime[requested={0,date} {0,time}, indicated={1,date} {1,time}, responded={2,date} {2,time}, confirmed={3,date} {3,time}]",
+ requested, indicated, responded, confirmed);
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public final class CommitTransactionResult
+ {
+ private String rollbackMessage;
+
+ private long timeStamp;
+
+ private Map<CDOIDTemp, CDOID> idMappings = new HashMap<CDOIDTemp, CDOID>();
+
+ private CDOReferenceAdjuster referenceAdjuster;
+
+ private InternalCDOCommitContext commitContext;
+
+ public CommitTransactionResult(InternalCDOCommitContext commitContext, String rollbackMessage)
+ {
+ this.rollbackMessage = rollbackMessage;
+ this.commitContext = commitContext;
+ }
+
+ public CommitTransactionResult(InternalCDOCommitContext commitContext, long timeStamp)
+ {
+ this.timeStamp = timeStamp;
+ this.commitContext = commitContext;
+ }
+
+ public CDOReferenceAdjuster getReferenceAdjuster()
+ {
+ if (referenceAdjuster == null)
+ {
+ referenceAdjuster = new CDOPostCommitReferenceAdjuster(commitContext.getTransaction(), new CDOIDMapper(
+ idMappings));
+ }
+
+ return referenceAdjuster;
+ }
+
+ public void setReferenceAdjuster(CDOReferenceAdjuster referenceAdjuster)
+ {
+ this.referenceAdjuster = referenceAdjuster;
+ }
+
+ public InternalCDOCommitContext getCommitContext()
+ {
+ return commitContext;
+ }
+
+ public String getRollbackMessage()
+ {
+ return rollbackMessage;
+ }
- public CommitTransactionResult commitTransactionPhase2(CDOXATransactionCommitContext xaContext, OMMonitor monitor);
+ public long getTimeStamp()
+ {
+ return timeStamp;
+ }
- public CommitTransactionResult commitTransactionPhase3(CDOXATransactionCommitContext xaContext, OMMonitor monitor);
+ public Map<CDOIDTemp, CDOID> getIDMappings()
+ {
+ return idMappings;
+ }
- public CommitTransactionResult commitTransactionCancel(CDOXATransactionCommitContext xaContext, OMMonitor monitor);
+ public void addIDMapping(CDOIDTemp oldID, CDOID newID)
+ {
+ idMappings.put(oldID, newID);
+ }
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOTransactionStrategy.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOTransactionStrategy.java
index 90e7922d59..4cbc3ac99d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOTransactionStrategy.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOTransactionStrategy.java
@@ -12,7 +12,7 @@ package org.eclipse.emf.spi.cdo;
import org.eclipse.emf.cdo.transaction.CDOSavepoint;
-import org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategy;
+import org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
@@ -26,7 +26,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
*/
public interface CDOTransactionStrategy
{
- public static final CDOTransactionStrategy DEFAULT = CDOSingleTransactionStrategy.INSTANCE;
+ public static final CDOTransactionStrategy DEFAULT = CDOSingleTransactionStrategyImpl.INSTANCE;
public void setTarget(InternalCDOTransaction transaction);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOCommitContext.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOCommitContext.java
deleted file mode 100644
index c4075a074b..0000000000
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOCommitContext.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * 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:
- * Simon McDuff - initial API and implementation
- * Eike Stepper - maintenance
- **************************************************************************/
-package org.eclipse.emf.spi.cdo;
-
-import org.eclipse.emf.cdo.transaction.CDOCommitContext;
-
-import org.eclipse.emf.internal.cdo.net4j.protocol.CommitTransactionResult;
-
-/**
- * Provides a context for a commit operation.
- *
- * @author Simon McDuff
- * @since 2.0
- */
-public interface InternalCDOCommitContext extends CDOCommitContext
-{
- public InternalCDOTransaction getTransaction();
-
- public void preCommit();
-
- public void postCommit(CommitTransactionResult result);
-}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java
index 23d6604758..b26f97867d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOTransaction.java
@@ -15,9 +15,12 @@ import org.eclipse.emf.cdo.common.id.CDOIDTemp;
import org.eclipse.emf.cdo.common.revision.delta.CDOFeatureDelta;
import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.transaction.CDOCommitContext;
import org.eclipse.emf.cdo.transaction.CDOSavepoint;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
+
import java.util.List;
import java.util.Set;
@@ -57,4 +60,18 @@ public interface InternalCDOTransaction extends CDOTransaction, InternalCDOView
public void setConflict(InternalCDOObject object);
public void handleConflicts(Set<CDOObject> conflicts);
+
+ /**
+ * Provides a context for a commit operation.
+ *
+ * @author Simon McDuff
+ */
+ public interface InternalCDOCommitContext extends CDOCommitContext
+ {
+ public InternalCDOTransaction getTransaction();
+
+ public void preCommit();
+
+ public void postCommit(CommitTransactionResult result);
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOXATransaction.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOXATransaction.java
new file mode 100644
index 0000000000..227b552364
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOXATransaction.java
@@ -0,0 +1,44 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * 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.spi.cdo;
+
+import org.eclipse.emf.cdo.common.id.CDOIDProvider;
+import org.eclipse.emf.cdo.internal.common.id.CDOIDExternalTempImpl;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.transaction.CDOXATransaction;
+
+import org.eclipse.emf.spi.cdo.CDOSessionProtocol.CommitTransactionResult;
+import org.eclipse.emf.spi.cdo.InternalCDOTransaction.InternalCDOCommitContext;
+
+import java.util.Map;
+import java.util.concurrent.Callable;
+
+/**
+ * @author Eike Stepper
+ * @since 2.0
+ */
+public interface InternalCDOXATransaction extends CDOXATransaction
+{
+ public InternalCDOXACommitContext getCommitContext(CDOTransaction transaction);
+
+ /**
+ * @author Eike Stepper
+ * @since 2.0
+ */
+ public interface InternalCDOXACommitContext extends Callable<Object>, CDOIDProvider, InternalCDOCommitContext
+ {
+ public InternalCDOXATransaction getTransactionManager();
+
+ public Map<CDOIDExternalTempImpl, InternalCDOTransaction> getRequestedIDs();
+
+ public CommitTransactionResult getResult();
+ }
+}

Back to the top