Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2009-07-07 06:48:20 +0000
committerEike Stepper2009-07-07 06:48:20 +0000
commit5ad4d1e291ed7a66e0eb8200ed4c4caf11d09051 (patch)
treed892854095c40349806ee67edd8525895febf4b6
parent62d0e9176177ae7b73cf6f1aff125dc42ed786f1 (diff)
downloadcdo-5ad4d1e291ed7a66e0eb8200ed4c4caf11d09051.tar.gz
cdo-5ad4d1e291ed7a66e0eb8200ed4c4caf11d09051.tar.xz
cdo-5ad4d1e291ed7a66e0eb8200ed4c4caf11d09051.zip
[282616] Provide internal interfaces for all server components
https://bugs.eclipse.org/bugs/show_bug.cgi?id=282616
-rw-r--r--plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/db/CDOCommonDBUtil.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractDBAccessor.java17
-rw-r--r--plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractQueryStatement.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractUpdateStatement.java20
-rw-r--r--plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/DBRevisionCacheUtil.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/cache/DBRevisionCache.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/io/CDODataInput.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/io/CDODataOutput.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/io/CDODataInputImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/io/CDODataOutputImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.defs/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/org.eclipse.emf.cdo.defs/.settings/org.eclipse.jdt.ui.prefs56
-rw-r--r--plugins/org.eclipse.emf.cdo.defs/src/org/eclipse/emf/cdo/defs/impl/CDOClientProtocolFactoryDefImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOTimeRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ChangeSubscriptionRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitNotificationIndication.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionPhase2Request.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/GetRemoteSessionsRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadChunkRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadLibrariesRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadPackagesRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionByTimeRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionByVersionRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LockObjectsRequest.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ObjectLockedRequest.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/OpenSessionRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryCancelRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ResourceIDRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/SetAuditRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/SetPassiveUpdateRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnlockObjectsRequest.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnsubscribeRemoteSessionsRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/VerifyRevisionRequest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOIDAnyUserType.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOManyAttributeSetter.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOManyReferenceSetter.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LockObjectsIndication.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/ObjectLockedIndication.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnlockObjectsIndication.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/.settings/.api_filters12
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockManager.java (renamed from plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/LockManager.java)6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Transaction.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContextImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ISession.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/StoreThreadLocal.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/ISessionProtocol.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalAudit.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitManager.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalLockManager.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalQueryManager.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalQueryResult.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRevisionManager.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalSession.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalSessionManager.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalTransaction.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalView.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/AllTestsHibernate.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerTest.java59
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOLock.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java10
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/NOOPLockImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/CDOSessionProtocol.java9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOView.java11
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/IRWLockManager.java10
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWLockManager.java29
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/container/ContainerUtil.java1
74 files changed, 321 insertions, 168 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/db/CDOCommonDBUtil.java b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/db/CDOCommonDBUtil.java
index 98fb676649..05f5d867d1 100644
--- a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/db/CDOCommonDBUtil.java
+++ b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/db/CDOCommonDBUtil.java
@@ -24,7 +24,7 @@ import org.eclipse.net4j.db.IDBConnectionProvider;
/**
* @author Eike Stepper
- * @since 2.0
+ * @since 3.0
*/
public final class CDOCommonDBUtil
{
diff --git a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractDBAccessor.java b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractDBAccessor.java
index 11327e5d46..3f00f31c40 100644
--- a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractDBAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractDBAccessor.java
@@ -1,3 +1,14 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Andre Dietisheim - initial API and implementation
+ * Eike Stepper - maintenance
+ **************************************************************************/
package org.eclipse.emf.cdo.common.internal.db;
import org.eclipse.emf.cdo.common.internal.db.bundle.OM;
@@ -8,9 +19,12 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
+/**
+ * @author Andre Dietisheim
+ */
public abstract class AbstractDBAccessor
{
- static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, AbstractDBAccessor.class);
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, AbstractDBAccessor.class);
protected PreparedStatement getPreparedStatement(Connection connection) throws Exception
{
@@ -23,5 +37,4 @@ public abstract class AbstractDBAccessor
protected abstract String getSQL();
protected abstract void setParameters(PreparedStatement statement) throws SQLException, Exception;
-
}
diff --git a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractQueryStatement.java b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractQueryStatement.java
index 0ec80bb8b4..b5e2b111fe 100644
--- a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractQueryStatement.java
+++ b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractQueryStatement.java
@@ -1,12 +1,28 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Andre Dietisheim - initial API and implementation
+ * Eike Stepper - maintenance
+ **************************************************************************/
package org.eclipse.emf.cdo.common.internal.db;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
+/**
+ * @author Andre Dietisheim
+ */
public abstract class AbstractQueryStatement<Result> extends AbstractDBAccessor
{
- protected abstract Result getResult(ResultSet resultSet) throws Exception;
+ public AbstractQueryStatement()
+ {
+ }
public Result query(Connection connection) throws Exception
{
@@ -19,10 +35,9 @@ public abstract class AbstractQueryStatement<Result> extends AbstractDBAccessor
resultSet.close();
return result;
}
- else
- {
- return null;
- }
+
+ return null;
}
+ protected abstract Result getResult(ResultSet resultSet) throws Exception;
}
diff --git a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractUpdateStatement.java b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractUpdateStatement.java
index 4c192a2d10..77384837e2 100644
--- a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractUpdateStatement.java
+++ b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/AbstractUpdateStatement.java
@@ -1,3 +1,14 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * 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:
+ * Andre Dietisheim - initial API and implementation
+ * Eike Stepper - maintenance
+ **************************************************************************/
package org.eclipse.emf.cdo.common.internal.db;
import org.eclipse.net4j.db.DBException;
@@ -6,17 +17,24 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.text.MessageFormat;
+/**
+ * @author Andre Dietisheim
+ */
public abstract class AbstractUpdateStatement extends AbstractDBAccessor
{
- public void update(Connection connection) throws Exception
+ public AbstractUpdateStatement()
{
+ }
+ public void update(Connection connection) throws Exception
+ {
PreparedStatement preparedStatement = getPreparedStatement(connection);
preparedStatement.executeUpdate();
if (preparedStatement.getUpdateCount() == 0)
{
throw new DBException(MessageFormat.format("No row inserted by statement \"{0}\"", getSQL()));
}
+
connection.commit();
}
diff --git a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/DBRevisionCacheUtil.java b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/DBRevisionCacheUtil.java
index d6c63ea32f..84ce8bdde1 100644
--- a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/DBRevisionCacheUtil.java
+++ b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/DBRevisionCacheUtil.java
@@ -27,15 +27,11 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.MessageFormat;
-// TODO: Auto-generated Javadoc
/**
- * The Class DBRevisionCacheUtil.
- *
* @author Andre Dietisheim
*/
public class DBRevisionCacheUtil
{
-
/**
* Mandatory insert update.
*
diff --git a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/cache/DBRevisionCache.java b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/cache/DBRevisionCache.java
index f237c027c6..c78f97a2bb 100644
--- a/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/cache/DBRevisionCache.java
+++ b/plugins/org.eclipse.emf.cdo.common.db/src/org/eclipse/emf/cdo/common/internal/db/cache/DBRevisionCache.java
@@ -209,9 +209,11 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
{
return null;
}
+
return revision.getID();
}
};
+
return query.query(connection);
}
catch (Exception e)
@@ -234,6 +236,7 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
public InternalCDORevision getRevision(final CDOID id)
{
Connection connection = null;
+
try
{
connection = getConnection();
@@ -302,6 +305,7 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
public InternalCDORevision getRevisionByTime(final CDOID id, final long timeStamp)
{
Connection connection = null;
+
try
{
connection = getConnection();
@@ -340,6 +344,7 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
return toRevision(blob, revised);
}
};
+
return query.query(connection);
}
catch (Exception e)
@@ -364,6 +369,7 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
public InternalCDORevision getRevisionByVersion(final CDOID id, final int version)
{
Connection connection = null;
+
try
{
connection = getConnection();
@@ -402,6 +408,7 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
return toRevision(blob, revised);
}
};
+
return query.query(connection);
}
catch (Exception e)
@@ -422,6 +429,7 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
public List<CDORevision> getRevisions()
{
Connection connection = null;
+
try
{
connection = getConnection();
@@ -453,15 +461,18 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
protected List<CDORevision> getResult(ResultSet resultSet) throws Exception
{
final List<CDORevision> revisionList = new ArrayList<CDORevision>();
+
do
{
long revised = resultSet.getLong(2);
Blob blob = resultSet.getBlob(1);
revisionList.add(toRevision(blob, revised));
} while (resultSet.next());
+
return revisionList;
}
};
+
return query.query(connection);
}
catch (Exception e)
@@ -485,6 +496,7 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
public boolean addRevision(final InternalCDORevision revision)
{
Connection connection = null;
+
try
{
connection = getConnection();
@@ -615,6 +627,7 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
public InternalCDORevision removeRevision(CDOID id, int version)
{
Connection connection = null;
+
try
{
connection = getConnection();
@@ -640,8 +653,10 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
preparedStatement.setInt(2, revision.getVersion());
}
};
+
update.update(connection);
}
+
return revision;
}
catch (Exception e)
@@ -657,6 +672,7 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
public void clear()
{
Connection connection = null;
+
try
{
connection = getConnection();
@@ -671,6 +687,7 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
return builder.toString();
}
};
+
update.update(connection);
}
catch (Exception e)
@@ -712,6 +729,7 @@ public class DBRevisionCache extends Lifecycle implements CDORevisionCache
private void createTable() throws SQLException
{
Connection connection = null;
+
try
{
connection = getConnection();
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/io/CDODataInput.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/io/CDODataInput.java
index 81ee1229f4..9d44dfc0e7 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/io/CDODataInput.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/io/CDODataInput.java
@@ -24,7 +24,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.common.revision.delta.CDOFeatureDelta;
import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.io.ExtendedDataInput;
import org.eclipse.emf.ecore.EClass;
@@ -89,5 +89,8 @@ public interface CDODataInput extends ExtendedDataInput
// /////////////////////////////////////////////////////////////////////////////////////////////////
- public RWLockManager.LockType readCDOLockType() throws IOException;
+ /**
+ * @since 3.0
+ */
+ public LockType readCDOLockType() throws IOException;
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/io/CDODataOutput.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/io/CDODataOutput.java
index f67682be27..7acdbe66c8 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/io/CDODataOutput.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/io/CDODataOutput.java
@@ -4,7 +4,7 @@
* 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
* Simon McDuff - maintenance
@@ -24,7 +24,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.common.revision.delta.CDOFeatureDelta;
import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.io.ExtendedDataOutput;
import org.eclipse.emf.ecore.EClass;
@@ -92,5 +92,8 @@ public interface CDODataOutput extends ExtendedDataOutput
// /////////////////////////////////////////////////////////////////////////////////////////////////
- public void writeCDOLockType(RWLockManager.LockType lockType) throws IOException;
+ /**
+ * @since 3.0
+ */
+ public void writeCDOLockType(LockType lockType) throws IOException;
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/io/CDODataInputImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/io/CDODataInputImpl.java
index 151741210c..cecf738ff6 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/io/CDODataInputImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/io/CDODataInputImpl.java
@@ -58,7 +58,7 @@ import org.eclipse.emf.cdo.spi.common.revision.InternalCDOList;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.net4j.util.ImplementationError;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.io.ExtendedDataInput;
import org.eclipse.net4j.util.io.StringIO;
import org.eclipse.net4j.util.om.trace.ContextTracer;
@@ -347,9 +347,9 @@ public abstract class CDODataInputImpl extends ExtendedDataInput.Delegating impl
return readCDORevisionOrPrimitive();
}
- public RWLockManager.LockType readCDOLockType() throws IOException
+ public LockType readCDOLockType() throws IOException
{
- return readBoolean() ? RWLockManager.LockType.WRITE : RWLockManager.LockType.READ;
+ return readBoolean() ? LockType.WRITE : LockType.READ;
}
protected StringIO getPackageURICompressor()
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/io/CDODataOutputImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/io/CDODataOutputImpl.java
index 48103ae012..99c1096795 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/io/CDODataOutputImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/io/CDODataOutputImpl.java
@@ -37,7 +37,7 @@ import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageInfo;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.io.ExtendedDataOutput;
import org.eclipse.net4j.util.io.StringIO;
import org.eclipse.net4j.util.om.trace.ContextTracer;
@@ -331,9 +331,9 @@ public abstract class CDODataOutputImpl extends ExtendedDataOutput.Delegating im
}
}
- public void writeCDOLockType(RWLockManager.LockType lockType) throws IOException
+ public void writeCDOLockType(LockType lockType) throws IOException
{
- writeBoolean(lockType == RWLockManager.LockType.WRITE ? true : false);
+ writeBoolean(lockType == LockType.WRITE ? true : false);
}
protected StringIO getPackageURICompressor()
diff --git a/plugins/org.eclipse.emf.cdo.defs/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.defs/.settings/org.eclipse.jdt.core.prefs
index 702162b414..fabe8fec4a 100644
--- a/plugins/org.eclipse.emf.cdo.defs/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.emf.cdo.defs/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Wed Dec 31 15:41:04 CET 2008
+#Tue Jul 07 08:45:18 CEST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -8,6 +8,8 @@ org.eclipse.jdt.core.codeComplete.localPrefixes=
org.eclipse.jdt.core.codeComplete.localSuffixes=
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
@@ -260,6 +262,8 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
diff --git a/plugins/org.eclipse.emf.cdo.defs/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.emf.cdo.defs/.settings/org.eclipse.jdt.ui.prefs
index 70d70800f0..f91aaa4ea2 100644
--- a/plugins/org.eclipse.emf.cdo.defs/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.emf.cdo.defs/.settings/org.eclipse.jdt.ui.prefs
@@ -1,4 +1,4 @@
-#Wed Dec 31 15:41:04 CET 2008
+#Tue Jul 07 08:45:18 CEST 2009
cleanup.add_default_serial_version_id=true
cleanup.add_generated_serial_version_id=false
cleanup.add_missing_annotations=true
@@ -52,6 +52,7 @@ cleanup.use_this_for_non_static_method_access_only_if_necessary=true
cleanup_profile=_EMFT
cleanup_settings_version=2
eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_EMFT
formatter_settings_version=11
org.eclipse.jdt.ui.exception.name=ex
@@ -63,4 +64,55 @@ org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Eike Stepper - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Eike Stepper\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Eike Stepper - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Eike Stepper\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.php.ui.editor.templates.php.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="false" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.php.ui.editor.templates.php.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="false" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.php.ui.editor.templates.php.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.php.ui.editor.templates.php.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.php.ui.editor.templates.php.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.php.ui.editor.templates.php.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-JSDoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=true
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.emf.cdo.defs/src/org/eclipse/emf/cdo/defs/impl/CDOClientProtocolFactoryDefImpl.java b/plugins/org.eclipse.emf.cdo.defs/src/org/eclipse/emf/cdo/defs/impl/CDOClientProtocolFactoryDefImpl.java
index 94fb493cb7..617d87ec1a 100644
--- a/plugins/org.eclipse.emf.cdo.defs/src/org/eclipse/emf/cdo/defs/impl/CDOClientProtocolFactoryDefImpl.java
+++ b/plugins/org.eclipse.emf.cdo.defs/src/org/eclipse/emf/cdo/defs/impl/CDOClientProtocolFactoryDefImpl.java
@@ -4,7 +4,7 @@
* 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:
* Andre Dietisheim - initial API and implementation
* Eike Stepper - maintenance
@@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.defs.CDOClientProtocolFactoryDef;
import org.eclipse.emf.cdo.defs.CDODefsPackage;
import org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocolFactory;
-
import org.eclipse.net4j.defs.impl.ClientProtocolFactoryDefImpl;
import org.eclipse.emf.ecore.EClass;
@@ -57,5 +56,4 @@ public class CDOClientProtocolFactoryDefImpl extends ClientProtocolFactoryDefImp
{
return new CDOClientProtocolFactory();
}
-
} // CDOClientProtocolFactoryDefImpl
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOTimeRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOTimeRequest.java
index 5ee5641bf5..da187e37c0 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOTimeRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOTimeRequest.java
@@ -14,7 +14,6 @@ import org.eclipse.emf.cdo.common.io.CDODataInput;
import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.spi.cdo.CDOSessionProtocol.RepositoryTimeResult;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ChangeSubscriptionRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ChangeSubscriptionRequest.java
index 32d6b5dfbc..9662c818cf 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ChangeSubscriptionRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ChangeSubscriptionRequest.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitNotificationIndication.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitNotificationIndication.java
index e90fc37b33..2c60ddac2a 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitNotificationIndication.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitNotificationIndication.java
@@ -21,7 +21,6 @@ import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.spi.cdo.InternalCDOSession;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionPhase2Request.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionPhase2Request.java
index 347648fa27..832740e138 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionPhase2Request.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CommitTransactionPhase2Request.java
@@ -20,7 +20,6 @@ import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
import org.eclipse.emf.cdo.internal.net4j.messages.Messages;
import org.eclipse.emf.cdo.util.CDOURIUtil;
-
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.trace.ContextTracer;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/GetRemoteSessionsRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/GetRemoteSessionsRequest.java
index 6689f7c596..234616827e 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/GetRemoteSessionsRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/GetRemoteSessionsRequest.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
import org.eclipse.emf.cdo.session.remote.CDORemoteSession;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.spi.cdo.InternalCDORemoteSessionManager;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadChunkRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadChunkRequest.java
index d2534eed6b..911f35302d 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadChunkRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadChunkRequest.java
@@ -19,7 +19,6 @@ import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
-
import org.eclipse.net4j.util.collection.MoveableList;
import org.eclipse.net4j.util.om.trace.ContextTracer;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadLibrariesRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadLibrariesRequest.java
index abb63a6274..b7c34109bf 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadLibrariesRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadLibrariesRequest.java
@@ -13,7 +13,6 @@ package org.eclipse.emf.cdo.internal.net4j.protocol;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
-
import org.eclipse.net4j.signal.RequestWithConfirmation;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadPackagesRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadPackagesRequest.java
index b85a6c110f..978e3d72ff 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadPackagesRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadPackagesRequest.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.ecore.EPackage;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionByTimeRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionByTimeRequest.java
index 91a36e98c1..5791fb60b5 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionByTimeRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionByTimeRequest.java
@@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionByVersionRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionByVersionRequest.java
index 62594e77e7..9f746df55a 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionByVersionRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LoadRevisionByVersionRequest.java
@@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LockObjectsRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LockObjectsRequest.java
index 54f481b4f1..33bc5d5229 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LockObjectsRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LockObjectsRequest.java
@@ -4,7 +4,7 @@
* 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
**************************************************************************/
@@ -19,8 +19,7 @@ import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
import org.eclipse.emf.cdo.transaction.CDOTimeStampContext;
import org.eclipse.emf.cdo.view.CDOView;
-
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.spi.cdo.InternalCDOObject;
@@ -40,12 +39,12 @@ public class LockObjectsRequest extends AbstractSyncRevisionsRequest
private CDOView view;
- private RWLockManager.LockType lockType;
+ private LockType lockType;
private long timeout;
public LockObjectsRequest(CDOClientProtocol protocol, CDOView view, Map<CDOID, CDOIDAndVersion> idAndVersions,
- int referenceChunk, long timeout, RWLockManager.LockType lockType)
+ int referenceChunk, long timeout, LockType lockType)
{
super(protocol, CDOProtocolConstants.SIGNAL_LOCK_OBJECTS, idAndVersions, referenceChunk);
this.view = view;
@@ -65,7 +64,7 @@ public class LockObjectsRequest extends AbstractSyncRevisionsRequest
if (TRACER.isEnabled())
{
TRACER.format("Locking of type {0} requested for view {1} with timeout {2}", //$NON-NLS-1$
- lockType == RWLockManager.LockType.READ ? "read" : "write", view.getViewID(), timeout); //$NON-NLS-1$ //$NON-NLS-2$
+ lockType == LockType.READ ? "read" : "write", view.getViewID(), timeout); //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ObjectLockedRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ObjectLockedRequest.java
index 94bd76351f..8cc204934d 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ObjectLockedRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ObjectLockedRequest.java
@@ -4,7 +4,7 @@
* 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
**************************************************************************/
@@ -17,8 +17,7 @@ import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
import org.eclipse.emf.cdo.view.CDOView;
-
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -34,12 +33,12 @@ public class ObjectLockedRequest extends CDOClientRequest<Boolean>
private CDOObject object;
- private RWLockManager.LockType lockType;
+ private LockType lockType;
private boolean byOthers;
- public ObjectLockedRequest(CDOClientProtocol protocol, CDOView view, CDOObject object,
- RWLockManager.LockType lockType, boolean byOthers)
+ public ObjectLockedRequest(CDOClientProtocol protocol, CDOView view, CDOObject object, LockType lockType,
+ boolean byOthers)
{
super(protocol, CDOProtocolConstants.SIGNAL_OBJECT_LOCKED);
this.view = view;
@@ -54,7 +53,7 @@ public class ObjectLockedRequest extends CDOClientRequest<Boolean>
if (TRACER.isEnabled())
{
TRACER.format("Requesting if object {0} has of lock for object {1}", object.cdoID(), //$NON-NLS-1$
- lockType == RWLockManager.LockType.READ ? "read" : "write"); //$NON-NLS-1$ //$NON-NLS-2$
+ lockType == LockType.READ ? "read" : "write"); //$NON-NLS-1$ //$NON-NLS-2$
}
out.writeInt(view.getViewID());
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/OpenSessionRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/OpenSessionRequest.java
index a2783860f3..0cf721bcba 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/OpenSessionRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/OpenSessionRequest.java
@@ -22,7 +22,6 @@ import org.eclipse.emf.cdo.internal.net4j.messages.Messages;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
import org.eclipse.emf.cdo.util.ServerException;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.spi.cdo.CDOSessionProtocol.OpenSessionResult;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryCancelRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryCancelRequest.java
index 32afbaacdf..2117e85e6d 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryCancelRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryCancelRequest.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryRequest.java
index 48d32e8888..95e6d066a7 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/QueryRequest.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.cdo.common.util.CDOQueryQueue;
import org.eclipse.emf.cdo.internal.common.CDOQueryInfoImpl;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.spi.cdo.AbstractQueryIterator;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ResourceIDRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ResourceIDRequest.java
index 0741e04c4d..7309b3c2e7 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ResourceIDRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ResourceIDRequest.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/SetAuditRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/SetAuditRequest.java
index 4da92e9e80..7dc7ded74d 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/SetAuditRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/SetAuditRequest.java
@@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.spi.cdo.InternalCDOObject;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/SetPassiveUpdateRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/SetPassiveUpdateRequest.java
index 7d45d9b130..3394b8e466 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/SetPassiveUpdateRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/SetPassiveUpdateRequest.java
@@ -17,7 +17,6 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnlockObjectsRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnlockObjectsRequest.java
index b1d4dd3d81..f7a347bdc1 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnlockObjectsRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnlockObjectsRequest.java
@@ -4,7 +4,7 @@
* 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
**************************************************************************/
@@ -17,8 +17,7 @@ import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
import org.eclipse.emf.cdo.view.CDOView;
-
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
@@ -35,10 +34,10 @@ public class UnlockObjectsRequest extends CDOClientRequest<Boolean>
private Collection<? extends CDOObject> objects;
- private RWLockManager.LockType lockType;
+ private LockType lockType;
public UnlockObjectsRequest(CDOClientProtocol protocol, CDOView view, Collection<? extends CDOObject> objects,
- RWLockManager.LockType lockType)
+ LockType lockType)
{
super(protocol, CDOProtocolConstants.SIGNAL_UNLOCK_OBJECTS);
this.view = view;
@@ -64,7 +63,7 @@ public class UnlockObjectsRequest extends CDOClientRequest<Boolean>
{
if (TRACER.isEnabled())
{
- TRACER.format("Unlocking of type {0} requested for view {1}", lockType == RWLockManager.LockType.READ ? "read" //$NON-NLS-1$ //$NON-NLS-2$
+ TRACER.format("Unlocking of type {0} requested for view {1}", lockType == LockType.READ ? "read" //$NON-NLS-1$ //$NON-NLS-2$
: "write", view.getViewID()); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnsubscribeRemoteSessionsRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnsubscribeRemoteSessionsRequest.java
index 1c758885d7..a49cfcf8d6 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnsubscribeRemoteSessionsRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnsubscribeRemoteSessionsRequest.java
@@ -15,7 +15,6 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/VerifyRevisionRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/VerifyRevisionRequest.java
index fe45f5a678..204c68807a 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/VerifyRevisionRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/VerifyRevisionRequest.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.internal.net4j.bundle.OM;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
-
import org.eclipse.net4j.util.om.trace.ContextTracer;
import java.io.IOException;
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOIDAnyUserType.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOIDAnyUserType.java
index 925899e00f..aa25b7c435 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOIDAnyUserType.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOIDAnyUserType.java
@@ -84,6 +84,7 @@ public class CDOIDAnyUserType implements UserType
{
return null;
}
+
final int end1 = value.indexOf(SEPARATOR);
final int start2 = end1 + SEPARATOR.length();
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOManyAttributeSetter.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOManyAttributeSetter.java
index 5d83f43c33..7db9e84716 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOManyAttributeSetter.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOManyAttributeSetter.java
@@ -46,6 +46,7 @@ public class CDOManyAttributeSetter extends CDOPropertySetter
{
throw new IllegalArgumentException("Value is not a PersistentCollection but a " + value.getClass().getName());
}
+
if (!(value instanceof List))
{
throw new IllegalArgumentException("Value is not a list but a " + value.getClass().getName());
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOManyReferenceSetter.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOManyReferenceSetter.java
index 61fe860cd1..cba8d5d5e2 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOManyReferenceSetter.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOManyReferenceSetter.java
@@ -46,6 +46,7 @@ public class CDOManyReferenceSetter extends CDOPropertySetter
{
throw new IllegalArgumentException("Value is not a PersistentCollection but a " + value.getClass().getName());
}
+
if (!(value instanceof List))
{
throw new IllegalArgumentException("Value is not a list but a " + value.getClass().getName());
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LockObjectsIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LockObjectsIndication.java
index b0d54db319..a9df8b8734 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LockObjectsIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LockObjectsIndication.java
@@ -19,7 +19,7 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.server.IView;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.io.IORuntimeException;
import java.io.IOException;
@@ -31,7 +31,7 @@ import java.util.List;
*/
public class LockObjectsIndication extends AbstractSyncRevisionsIndication
{
- private RWLockManager.LockType lockType;
+ private LockType lockType;
private List<CDOID> ids = new ArrayList<CDOID>();
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/ObjectLockedIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/ObjectLockedIndication.java
index 91de914afa..ee51d14138 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/ObjectLockedIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/ObjectLockedIndication.java
@@ -4,7 +4,7 @@
* 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
@@ -17,7 +17,7 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.server.IView;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import java.io.IOException;
@@ -39,7 +39,7 @@ public class ObjectLockedIndication extends CDOReadIndication
int viewID = in.readInt();
IView view = getSession().getView(viewID);
- RWLockManager.LockType lockType = in.readCDOLockType();
+ LockType lockType = in.readCDOLockType();
CDOID id = in.readCDOID();
boolean byOthers = in.readBoolean();
if (byOthers)
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnlockObjectsIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnlockObjectsIndication.java
index 61301ab3fe..9dc6f67761 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnlockObjectsIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnlockObjectsIndication.java
@@ -4,7 +4,7 @@
* 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
@@ -17,7 +17,7 @@ import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.server.IView;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import java.io.IOException;
import java.util.ArrayList;
@@ -37,7 +37,7 @@ public class UnlockObjectsIndication extends CDOReadIndication
protected void indicating(CDODataInput in) throws IOException
{
int viewID = in.readInt();
- RWLockManager.LockType lockType = in.readCDOLockType();
+ LockType lockType = in.readCDOLockType();
int size = in.readInt();
IView view = getSession().getView(viewID);
diff --git a/plugins/org.eclipse.emf.cdo.server/.settings/.api_filters b/plugins/org.eclipse.emf.cdo.server/.settings/.api_filters
deleted file mode 100644
index 063ce74251..0000000000
--- a/plugins/org.eclipse.emf.cdo.server/.settings/.api_filters
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.emf.cdo.server" version="2">
- <resource path="src/org/eclipse/emf/cdo/server/ISessionManager.java" type="org.eclipse.emf.cdo.server.ISessionManager">
- <filter id="643846161">
- <message_arguments>
- <message_argument value="CDOServerProtocol"/>
- <message_argument value="ISessionManager"/>
- <message_argument value="openSession(CDOServerProtocol)"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/LockManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockManager.java
index 37b64dca54..41e5962364 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/LockManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockManager.java
@@ -9,12 +9,14 @@
* Simon McDuff - initial API and implementation
* Eike Stepper - maintenance
*/
-package org.eclipse.emf.cdo.spi.server;
+package org.eclipse.emf.cdo.internal.server;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.server.ISession;
import org.eclipse.emf.cdo.server.ISessionManager;
import org.eclipse.emf.cdo.server.IView;
+import org.eclipse.emf.cdo.spi.server.InternalLockManager;
+import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.net4j.util.ReflectUtil.ExcludeFromDump;
import org.eclipse.net4j.util.concurrent.RWLockManager;
@@ -24,7 +26,7 @@ import org.eclipse.net4j.util.event.IListener;
/**
* @author Simon McDuff
- * @since 2.0
+ * @since 3.0
*/
public class LockManager extends RWLockManager<CDOID, IView> implements InternalLockManager
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
index cf58a2de14..e261190878 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
@@ -40,7 +40,6 @@ import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.server.InternalRevisionManager;
import org.eclipse.emf.cdo.spi.server.InternalSession;
import org.eclipse.emf.cdo.spi.server.InternalSessionManager;
-import org.eclipse.emf.cdo.spi.server.LockManager;
import org.eclipse.net4j.util.StringUtil;
import org.eclipse.net4j.util.ReflectUtil.ExcludeFromDump;
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Transaction.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Transaction.java
index 0eaeb5fc6a..9bacd0605c 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Transaction.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Transaction.java
@@ -17,7 +17,6 @@ import org.eclipse.emf.cdo.spi.server.InternalCommitContext;
import org.eclipse.emf.cdo.spi.server.InternalSession;
import org.eclipse.emf.cdo.spi.server.InternalTransaction;
-
import java.text.MessageFormat;
/**
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContextImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContextImpl.java
index 7706029e20..7e07cc3baf 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContextImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContextImpl.java
@@ -37,8 +37,8 @@ import org.eclipse.emf.cdo.spi.server.InternalRevisionManager;
import org.eclipse.emf.cdo.spi.server.InternalTransaction;
import org.eclipse.net4j.util.StringUtil;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
import org.eclipse.net4j.util.concurrent.TimeoutRuntimeException;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.trace.ContextTracer;
@@ -416,7 +416,7 @@ public class TransactionCommitContextImpl implements InternalCommitContext
try
{
InternalLockManager lockManager = transaction.getRepository().getLockManager();
- lockManager.lock(RWLockManager.LockType.WRITE, transaction, lockedObjects, 1000);
+ lockManager.lock(LockType.WRITE, transaction, lockedObjects, 1000);
}
catch (TimeoutRuntimeException exception)
{
@@ -430,7 +430,7 @@ public class TransactionCommitContextImpl implements InternalCommitContext
if (!lockedObjects.isEmpty())
{
InternalLockManager lockManager = transaction.getRepository().getLockManager();
- lockManager.unlock(RWLockManager.LockType.WRITE, transaction, lockedObjects);
+ lockManager.unlock(LockType.WRITE, transaction, lockedObjects);
lockedObjects.clear();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ISession.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ISession.java
index 6e5dbba4a8..973266aa50 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ISession.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ISession.java
@@ -21,8 +21,14 @@ import org.eclipse.net4j.util.container.IContainer;
*/
public interface ISession extends CDOCommonSession, IContainer<IView>
{
+ /**
+ * @since 3.0
+ */
public ISessionManager getManager();
+ /**
+ * @since 3.0
+ */
public ISessionProtocol getProtocol();
/**
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
index a7bde5ef8c..e9eb96a652 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/IStoreAccessor.java
@@ -51,7 +51,7 @@ public interface IStoreAccessor extends IQueryHandlerProvider
/**
* Returns the session this accessor is associated with.
*
- * @since 2.0
+ * @since 3.0
*/
public InternalSession getSession();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/StoreThreadLocal.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/StoreThreadLocal.java
index 4cbea55764..d8cc7fd2f7 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/StoreThreadLocal.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/StoreThreadLocal.java
@@ -30,6 +30,9 @@ public final class StoreThreadLocal
{
}
+ /**
+ * @since 3.0
+ */
public static void setSession(InternalSession session)
{
SESSION.set(session);
@@ -42,6 +45,7 @@ public final class StoreThreadLocal
* @return Never <code>null</code>.
* @throws IllegalStateException
* if no session is associated with the current thread.
+ * @since 3.0
*/
public static InternalSession getSession()
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/ISessionProtocol.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/ISessionProtocol.java
index d229dd08fc..f79c0bd411 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/ISessionProtocol.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/ISessionProtocol.java
@@ -22,6 +22,7 @@ import java.util.List;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface ISessionProtocol extends CDOProtocol
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalAudit.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalAudit.java
index c17c1f46e0..88c261f8cd 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalAudit.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalAudit.java
@@ -14,8 +14,8 @@ import org.eclipse.emf.cdo.server.IAudit;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface InternalAudit extends IAudit, InternalView
{
-
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java
index 88c257385a..b5c4eeb4a2 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitContext.java
@@ -1,3 +1,13 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * 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.cdo.spi.server;
import org.eclipse.emf.cdo.common.id.CDOID;
@@ -12,8 +22,8 @@ import org.eclipse.net4j.util.om.monitor.OMMonitor;
import java.util.List;
/**
- * @author Simon McDuff
- * @since 2.0
+ * @author Eike Stepper
+ * @since 3.0
*/
public interface InternalCommitContext extends IStoreAccessor.CommitContext
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitManager.java
index 97860e51fc..d6e2ac9cb8 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalCommitManager.java
@@ -10,13 +10,13 @@
*/
package org.eclipse.emf.cdo.spi.server;
-
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import java.util.concurrent.ExecutionException;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface InternalCommitManager
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalLockManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalLockManager.java
index 7f0ce87cd6..2a8d3e853b 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalLockManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalLockManager.java
@@ -17,6 +17,7 @@ import org.eclipse.net4j.util.concurrent.IRWLockManager;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface InternalLockManager extends IRWLockManager<CDOID, IView>
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalQueryManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalQueryManager.java
index 6dce53ac89..769a43447f 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalQueryManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalQueryManager.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.common.CDOQueryInfo;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface InternalQueryManager
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalQueryResult.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalQueryResult.java
index 816bcde7e0..74ecdba65e 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalQueryResult.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalQueryResult.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.common.util.CDOQueryQueue;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface InternalQueryResult extends BlockingCloseableIterator<Object>
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java
index 368881624b..7e3a930bae 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java
@@ -24,6 +24,7 @@ import java.util.List;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface InternalRepository extends IRepository, InternalCDOPackageRegistry.PackageLoader
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRevisionManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRevisionManager.java
index 7b30bdc175..0d0f1052b5 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRevisionManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRevisionManager.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.ecore.EStructuralFeature;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface InternalRevisionManager extends IRevisionManager
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalSession.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalSession.java
index 028301ff11..bf6cb86b62 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalSession.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalSession.java
@@ -26,6 +26,7 @@ import java.util.Set;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface InternalSession extends ISession, CDOIDProvider, CDOCommonSession.Options
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalSessionManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalSessionManager.java
index a5e381f0a8..314f54884e 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalSessionManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalSessionManager.java
@@ -23,6 +23,7 @@ import java.util.List;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface InternalSessionManager extends ISessionManager
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalTransaction.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalTransaction.java
index de72b0e44d..5d09d0b35c 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalTransaction.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalTransaction.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.server.ITransaction;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface InternalTransaction extends ITransaction, InternalView
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalView.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalView.java
index 8dc9a5dfbe..41d03a1120 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalView.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalView.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.cdo.server.IView;
/**
* @author Eike Stepper
+ * @since 3.0
*/
public interface InternalView extends IView
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
index 4767670c58..edf76816b9 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java
@@ -72,6 +72,9 @@ public abstract class StoreAccessor extends Lifecycle implements IStoreAccessor
return reader;
}
+ /**
+ * @since 3.0
+ */
public InternalSession getSession()
{
if (context instanceof ITransaction)
diff --git a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/AllTestsHibernate.java b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/AllTestsHibernate.java
index af37ddd368..9026ac3715 100644
--- a/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/AllTestsHibernate.java
+++ b/plugins/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/AllTestsHibernate.java
@@ -4,7 +4,7 @@
* 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
*/
@@ -50,5 +50,4 @@ public class AllTestsHibernate extends AllTestsAllConfigs
testClasses.remove(MEMStoreQueryTest.class);
testClasses.remove(DBStoreTest.class);
}
-
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerTest.java
index 7185bbcf0c..82a29e0d23 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerTest.java
@@ -23,6 +23,7 @@ import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.net4j.util.concurrent.RWLockManager;
import org.eclipse.net4j.util.concurrent.TimeoutRuntimeException;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.io.IOUtil;
import org.eclipse.net4j.util.transaction.TransactionException;
@@ -50,7 +51,7 @@ public class LockingManagerTest extends AbstractCDOTest
keys.add(1);
try
{
- lockingManager.lock(RWLockManager.LockType.WRITE, 1, keys, 50000);
+ lockingManager.lock(LockType.WRITE, 1, keys, 50000);
}
catch (InterruptedException ex)
{
@@ -67,36 +68,36 @@ public class LockingManagerTest extends AbstractCDOTest
keys.add(4);
msg("Context 1 have readlock 1,2,3,4");
- lockingManager.lock(RWLockManager.LockType.READ, 1, keys, 1000);
- assertEquals(true, lockingManager.hasLock(RWLockManager.LockType.READ, 1, 1));
- assertEquals(true, lockingManager.hasLock(RWLockManager.LockType.READ, 1, 2));
- assertEquals(true, lockingManager.hasLock(RWLockManager.LockType.READ, 1, 3));
- assertEquals(true, lockingManager.hasLock(RWLockManager.LockType.READ, 1, 4));
+ lockingManager.lock(LockType.READ, 1, keys, 1000);
+ assertEquals(true, lockingManager.hasLock(LockType.READ, 1, 1));
+ assertEquals(true, lockingManager.hasLock(LockType.READ, 1, 2));
+ assertEquals(true, lockingManager.hasLock(LockType.READ, 1, 3));
+ assertEquals(true, lockingManager.hasLock(LockType.READ, 1, 4));
keys.clear();
keys.add(1);
keys.add(2);
keys.add(3);
msg("Context 2 have readlock 1,2,3");
- lockingManager.lock(RWLockManager.LockType.READ, 2, keys, 1000);
- assertEquals(true, lockingManager.hasLock(RWLockManager.LockType.READ, 2, 1));
- assertEquals(true, lockingManager.hasLock(RWLockManager.LockType.READ, 2, 2));
- assertEquals(true, lockingManager.hasLock(RWLockManager.LockType.READ, 2, 3));
- assertEquals(true, lockingManager.hasLockByOthers(RWLockManager.LockType.READ, 2, 1));
- assertEquals(true, lockingManager.hasLockByOthers(RWLockManager.LockType.READ, 1, 1));
+ lockingManager.lock(LockType.READ, 2, keys, 1000);
+ assertEquals(true, lockingManager.hasLock(LockType.READ, 2, 1));
+ assertEquals(true, lockingManager.hasLock(LockType.READ, 2, 2));
+ assertEquals(true, lockingManager.hasLock(LockType.READ, 2, 3));
+ assertEquals(true, lockingManager.hasLockByOthers(LockType.READ, 2, 1));
+ assertEquals(true, lockingManager.hasLockByOthers(LockType.READ, 1, 1));
keys.clear();
keys.add(4);
msg("Context 1 have readlock 1,2,3,4 and writeLock 4");
- lockingManager.lock(RWLockManager.LockType.WRITE, 1, keys, 1000);
- assertEquals(true, lockingManager.hasLock(RWLockManager.LockType.READ, 1, 4));
- assertEquals(true, lockingManager.hasLock(RWLockManager.LockType.WRITE, 1, 4));
+ lockingManager.lock(LockType.WRITE, 1, keys, 1000);
+ assertEquals(true, lockingManager.hasLock(LockType.READ, 1, 4));
+ assertEquals(true, lockingManager.hasLock(LockType.WRITE, 1, 4));
keys.clear();
keys.add(1);
try
{
- lockingManager.lock(RWLockManager.LockType.WRITE, 1, keys, 1000);
+ lockingManager.lock(LockType.WRITE, 1, keys, 1000);
fail("Should not have exception");
}
catch (RuntimeException expected)
@@ -112,13 +113,13 @@ public class LockingManagerTest extends AbstractCDOTest
keys.add(1);
keys.add(2);
keys.add(3);
- lockingManager.unlock(RWLockManager.LockType.READ, 2, keys);
+ lockingManager.unlock(LockType.READ, 2, keys);
ITimeOuter timeOuter = new PollingTimeOuter(200, 100)
{
@Override
protected boolean successful()
{
- return lockingManager.hasLock(RWLockManager.LockType.WRITE, 1, 1);
+ return lockingManager.hasLock(LockType.WRITE, 1, 1);
}
};
@@ -130,11 +131,11 @@ public class LockingManagerTest extends AbstractCDOTest
final RWLockManager<Integer, Integer> lockingManager = new RWLockManager<Integer, Integer>();
Set<Integer> keys = new HashSet<Integer>();
keys.add(1);
- lockingManager.lock(RWLockManager.LockType.READ, 1, keys, 10000);
- lockingManager.unlock(RWLockManager.LockType.READ, 1, keys);
+ lockingManager.lock(LockType.READ, 1, keys, 10000);
+ lockingManager.unlock(LockType.READ, 1, keys);
try
{
- lockingManager.unlock(RWLockManager.LockType.READ, 1, keys);
+ lockingManager.unlock(LockType.READ, 1, keys);
fail("Should have an exception");
}
catch (IllegalMonitorStateException exception)
@@ -255,11 +256,11 @@ public class LockingManagerTest extends AbstractCDOTest
CDOObject cdoCompany = CDOUtil.getCDOObject(company);
CDOObject cdoCompany2 = CDOUtil.getCDOObject(company2);
- transaction.lockObjects(Collections.singletonList(cdoCompany), RWLockManager.LockType.WRITE, CDOLock.WAIT);
+ transaction.lockObjects(Collections.singletonList(cdoCompany), LockType.WRITE, CDOLock.WAIT);
try
{
- transaction2.lockObjects(Collections.singletonList(cdoCompany2), RWLockManager.LockType.WRITE, 1000);
+ transaction2.lockObjects(Collections.singletonList(cdoCompany2), LockType.WRITE, 1000);
fail("Should have an exception");
}
catch (TimeoutRuntimeException ex)
@@ -327,11 +328,11 @@ public class LockingManagerTest extends AbstractCDOTest
CDOObject cdoCompany = CDOUtil.getCDOObject(company);
CDOObject cdoCompany2 = CDOUtil.getCDOObject(company2);
- transaction.lockObjects(Collections.singletonList(cdoCompany), RWLockManager.LockType.WRITE, CDOLock.WAIT);
+ transaction.lockObjects(Collections.singletonList(cdoCompany), LockType.WRITE, CDOLock.WAIT);
try
{
- transaction2.lockObjects(Collections.singletonList(cdoCompany2), RWLockManager.LockType.WRITE, 1000);
+ transaction2.lockObjects(Collections.singletonList(cdoCompany2), LockType.WRITE, 1000);
fail("Should have an exception");
}
catch (TimeoutRuntimeException ex)
@@ -353,7 +354,7 @@ public class LockingManagerTest extends AbstractCDOTest
Company company2 = (Company)transaction2.getResource("/res1").getContents().get(0);
CDOObject cdoCompany = CDOUtil.getCDOObject(company);
- transaction.lockObjects(Collections.singletonList(cdoCompany), RWLockManager.LockType.READ, CDOLock.WAIT);
+ transaction.lockObjects(Collections.singletonList(cdoCompany), LockType.READ, CDOLock.WAIT);
company2.setCity("Ottawa");
try
@@ -380,7 +381,7 @@ public class LockingManagerTest extends AbstractCDOTest
Company company2 = (Company)transaction2.getResource("/res1").getContents().get(0);
CDOObject cdoCompany = CDOUtil.getCDOObject(company);
- transaction.lockObjects(Collections.singletonList(cdoCompany), RWLockManager.LockType.WRITE, CDOLock.WAIT);
+ transaction.lockObjects(Collections.singletonList(cdoCompany), LockType.WRITE, CDOLock.WAIT);
company2.setCity("Ottawa");
try
@@ -546,7 +547,7 @@ public class LockingManagerTest extends AbstractCDOTest
CDOObject cdoCompany = CDOUtil.getCDOObject(company);
cdoCompany.cdoReadLock().lock();
transaction.close();
- assertEquals(false, repo.getLockManager().hasLock(RWLockManager.LockType.READ, view, cdoCompany.cdoID()));
+ assertEquals(false, repo.getLockManager().hasLock(LockType.READ, view, cdoCompany.cdoID()));
}
public void testSessionClose() throws Exception
@@ -567,7 +568,7 @@ public class LockingManagerTest extends AbstractCDOTest
session.close();
sleep(100);
- assertEquals(false, repo.getLockManager().hasLock(RWLockManager.LockType.READ, view, cdoCompany.cdoID()));
+ assertEquals(false, repo.getLockManager().hasLock(LockType.READ, view, cdoCompany.cdoID()));
}
public void testBugzilla_270345() throws Exception
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOLock.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOLock.java
index 84a1b1f909..76412ec70f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOLock.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOLock.java
@@ -4,7 +4,7 @@
* 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
@@ -14,6 +14,7 @@ package org.eclipse.emf.cdo;
import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import java.util.concurrent.locks.Lock;
@@ -37,8 +38,10 @@ public interface CDOLock extends Lock
/**
* TODO Simon: JavaDoc
+ *
+ * @since 3.0
*/
- public RWLockManager.LockType getType();
+ public LockType getType();
/**
* Returns <code>true</code> if this lock is currently held by the requesting {@link CDOView view}, <code>false</code>
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java
index 9aad67fadd..2186b6f47d 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java
@@ -27,7 +27,7 @@ import org.eclipse.emf.cdo.util.CDOEvent;
import org.eclipse.emf.cdo.util.ReadOnlyException;
import org.eclipse.net4j.util.collection.CloseableIterator;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.event.INotifier;
import org.eclipse.net4j.util.options.IOptions;
import org.eclipse.net4j.util.options.IOptionsContainer;
@@ -127,7 +127,6 @@ public interface CDOView extends CDOCommonView, INotifier, IOptionsContainer
* {
* throw new TimeoutException();
* }
- *
* try
* {
* float sum = 0;
@@ -135,7 +134,6 @@ public interface CDOView extends CDOCommonView, INotifier, IOptionsContainer
* {
* sum += detail.getPrice();
* }
- *
* System.out.println(&quot;Sum: &quot; + sum);
* }
* finally
@@ -273,14 +271,16 @@ public interface CDOView extends CDOCommonView, INotifier, IOptionsContainer
/**
* Locks the given objects. Once the objects are locked, they will not be changed remotely or go in conflict state.
+ *
+ * @since 3.0
*/
- public void lockObjects(Collection<? extends CDOObject> objects, RWLockManager.LockType lockType, long timeout)
+ public void lockObjects(Collection<? extends CDOObject> objects, LockType lockType, long timeout)
throws InterruptedException;
/**
* Unlocks the given locked objects of this view.
*/
- public void unlockObjects(Collection<? extends CDOObject> objects, RWLockManager.LockType lockType);
+ public void unlockObjects(Collection<? extends CDOObject> objects, LockType lockType);
/**
* Unlocks all locked objects of this view.
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
index 7474278d15..3aaba76e81 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
@@ -27,8 +27,8 @@ import org.eclipse.emf.internal.cdo.util.FSMUtil;
import org.eclipse.net4j.util.ImplementationError;
import org.eclipse.net4j.util.WrappedException;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
import org.eclipse.net4j.util.concurrent.TimeoutRuntimeException;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.common.notify.Adapter;
@@ -179,7 +179,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
}
// Should we cache the locks ?
- return new CDOLockImpl(RWLockManager.LockType.READ);
+ return new CDOLockImpl(LockType.READ);
}
/**
@@ -193,7 +193,7 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
}
// Should we cache the locks ?
- return new CDOLockImpl(RWLockManager.LockType.WRITE);
+ return new CDOLockImpl(LockType.WRITE);
}
public void cdoInternalSetID(CDOID id)
@@ -1076,14 +1076,14 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
*/
private final class CDOLockImpl implements CDOLock
{
- private RWLockManager.LockType type;
+ private LockType type;
- public CDOLockImpl(RWLockManager.LockType type)
+ public CDOLockImpl(LockType type)
{
this.type = type;
}
- public RWLockManager.LockType getType()
+ public LockType getType()
{
return type;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/NOOPLockImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/NOOPLockImpl.java
index 74a20a1afc..a2487a234a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/NOOPLockImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/NOOPLockImpl.java
@@ -4,7 +4,7 @@
* 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
@@ -13,7 +13,7 @@ package org.eclipse.emf.internal.cdo;
import org.eclipse.emf.cdo.CDOLock;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
@@ -73,7 +73,10 @@ public class NOOPLockImpl implements CDOLock
throw new UnsupportedOperationException();
}
- public RWLockManager.LockType getType()
+ /**
+ * @since 3.0
+ */
+ public LockType getType()
{
return null;
}
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 a7e3454e8e..7293b36c9c 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
@@ -64,7 +64,7 @@ import org.eclipse.net4j.util.StringUtil;
import org.eclipse.net4j.util.ReflectUtil.ExcludeFromDump;
import org.eclipse.net4j.util.collection.CloseableIterator;
import org.eclipse.net4j.util.collection.HashBag;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.event.Notifier;
import org.eclipse.net4j.util.lifecycle.Lifecycle;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
@@ -276,7 +276,7 @@ public class CDOViewImpl extends Lifecycle implements InternalCDOView
* @throws InterruptedException
* @since 2.0
*/
- public void lockObjects(Collection<? extends CDOObject> objects, RWLockManager.LockType lockType, long timeout)
+ public void lockObjects(Collection<? extends CDOObject> objects, LockType lockType, long timeout)
throws InterruptedException
{
checkActive();
@@ -298,7 +298,7 @@ public class CDOViewImpl extends Lifecycle implements InternalCDOView
/**
* @since 2.0
*/
- public void unlockObjects(Collection<? extends CDOObject> objects, RWLockManager.LockType lockType)
+ public void unlockObjects(Collection<? extends CDOObject> objects, LockType lockType)
{
checkActive();
session.getSessionProtocol().unlockObjects(this, objects, lockType);
@@ -315,7 +315,7 @@ public class CDOViewImpl extends Lifecycle implements InternalCDOView
/**
* @since 2.0
*/
- public boolean isObjectLocked(CDOObject object, RWLockManager.LockType lockType, boolean byOthers)
+ public boolean isObjectLocked(CDOObject object, LockType lockType, boolean byOthers)
{
checkActive();
return session.getSessionProtocol().isObjectLocked(this, object, lockType, byOthers);
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 2a68954298..a956bddc7a 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
@@ -83,11 +83,20 @@ public interface CDOSessionProtocol extends CDOProtocol, PackageLoader
public boolean cancelQuery(int queryId);
+ /**
+ * @since 3.0
+ */
public void lockObjects(CDOView view, Map<CDOID, CDOIDAndVersion> objects, long timeout, LockType lockType)
throws InterruptedException;
+ /**
+ * @since 3.0
+ */
public void unlockObjects(CDOView view, Collection<? extends CDOObject> objects, LockType lockType);
+ /**
+ * @since 3.0
+ */
public boolean isObjectLocked(CDOView view, CDOObject object, LockType lockType, boolean byOthers);
public CommitTransactionResult commitTransaction(InternalCDOCommitContext commitContext, OMMonitor monitor);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOView.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOView.java
index 529aa4bac5..1b491ffc84 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOView.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOView.java
@@ -22,7 +22,7 @@ import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.internal.cdo.CDOStore;
-import org.eclipse.net4j.util.concurrent.RWLockManager;
+import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.lifecycle.ILifecycle;
import org.eclipse.emf.common.notify.Adapter;
@@ -94,7 +94,10 @@ public interface InternalCDOView extends CDOView, CDOIDProvider, ILifecycle
public Object convertIDToObject(Object potentialID);
- public boolean isObjectLocked(CDOObject object, RWLockManager.LockType lockType, boolean byOthers);
+ /**
+ * @since 3.0
+ */
+ public boolean isObjectLocked(CDOObject object, LockType lockType, boolean byOthers);
public void handleAddAdapter(InternalCDOObject eObject, Adapter adapter);
@@ -114,11 +117,11 @@ public interface InternalCDOView extends CDOView, CDOIDProvider, ILifecycle
* lock, it is not guarantee that the state didn't change immediately after.
* <p>
* <code>
- * if (cdoObject.cdoState() != CDOState.PROXY)
+ * if (cdoObject.cdoState() != CDOState.PROXY)
* {
* // At this point could be a proxy!
* cdoObject.cdoRevision();
- * }
+ * }
* </code>
* <p>
* The reason were we didn't use {@link CDOView#getLock()} is to not allow the access of that lock to the users since
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/IRWLockManager.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/IRWLockManager.java
index 4deefb0910..8e5132279f 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/IRWLockManager.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/IRWLockManager.java
@@ -26,10 +26,10 @@ public interface IRWLockManager<K, V>
public static final int NO_WAIT = 1;
- public void lock(IRWLockManager.LockType type, V context, Collection<? extends K> objectsToLock, long timeout)
+ public void lock(LockType type, V context, Collection<? extends K> objectsToLock, long timeout)
throws InterruptedException;
- public void lock(IRWLockManager.LockType type, V context, K objectToLock, long timeout) throws InterruptedException;
+ public void lock(LockType type, V context, K objectToLock, long timeout) throws InterruptedException;
/**
* Attempts to release for a given locktype, context and objects.
@@ -37,16 +37,16 @@ public interface IRWLockManager<K, V>
* @throws IllegalMonitorStateException
* Unlocking objects without lock.
*/
- public void unlock(IRWLockManager.LockType type, V context, Collection<? extends K> objectsToLock);
+ public void unlock(LockType type, V context, Collection<? extends K> objectsToLock);
/**
* Attempts to release all locks(read and write) for a given context.
*/
public void unlock(V context);
- public boolean hasLock(IRWLockManager.LockType type, V context, K objectToLock);
+ public boolean hasLock(LockType type, V context, K objectToLock);
- public boolean hasLockByOthers(IRWLockManager.LockType type, V context, K objectToLock);
+ public boolean hasLockByOthers(LockType type, V context, K objectToLock);
/**
* @author Simon McDuff
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWLockManager.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWLockManager.java
index 1a1a0ab026..679ad08288 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWLockManager.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWLockManager.java
@@ -94,13 +94,19 @@ public class RWLockManager<K, V> extends Lifecycle implements IRWLockManager<K,
private Object lockChanged = new Object();
- public void lock(RWLockManager.LockType type, V context, Collection<? extends K> objectsToLock, long timeout)
+ /**
+ * @since 3.0
+ */
+ public void lock(LockType type, V context, Collection<? extends K> objectsToLock, long timeout)
throws InterruptedException
{
lock(getLockingStrategy(type), context, objectsToLock, timeout);
}
- public void lock(RWLockManager.LockType type, V context, K objectToLock, long timeout) throws InterruptedException
+ /**
+ * @since 3.0
+ */
+ public void lock(LockType type, V context, K objectToLock, long timeout) throws InterruptedException
{
lock(type, context, Collections.singletonList(objectToLock), timeout);
}
@@ -110,8 +116,9 @@ public class RWLockManager<K, V> extends Lifecycle implements IRWLockManager<K,
*
* @throws IllegalMonitorStateException
* Unlocking objects without lock.
+ * @since 3.0
*/
- public void unlock(RWLockManager.LockType type, V context, Collection<? extends K> objectsToLock)
+ public void unlock(LockType type, V context, Collection<? extends K> objectsToLock)
{
unlock(getLockingStrategy(type), context, objectsToLock);
}
@@ -153,26 +160,32 @@ public class RWLockManager<K, V> extends Lifecycle implements IRWLockManager<K,
}
}
- public boolean hasLock(RWLockManager.LockType type, V context, K objectToLock)
+ /**
+ * @since 3.0
+ */
+ public boolean hasLock(LockType type, V context, K objectToLock)
{
return hasLock(getLockingStrategy(type), context, objectToLock);
}
- public boolean hasLockByOthers(RWLockManager.LockType type, V context, K objectToLock)
+ /**
+ * @since 3.0
+ */
+ public boolean hasLockByOthers(LockType type, V context, K objectToLock)
{
LockStrategy<K, V> lockingStrategy = getLockingStrategy(type);
LockEntry<K, V> entry = getLockEntry(objectToLock);
return null != entry && lockingStrategy.isLockedByOthers(entry, context);
}
- private LockStrategy<K, V> getLockingStrategy(RWLockManager.LockType type)
+ private LockStrategy<K, V> getLockingStrategy(LockType type)
{
- if (type == RWLockManager.LockType.READ)
+ if (type == LockType.READ)
{
return readLockStrategy;
}
- if (type == RWLockManager.LockType.WRITE)
+ if (type == LockType.WRITE)
{
return writeLockStrategy;
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/container/ContainerUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/container/ContainerUtil.java
index 452a3566ea..889ea939c6 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/container/ContainerUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/container/ContainerUtil.java
@@ -26,7 +26,6 @@ public final class ContainerUtil
private static final IContainer<Object> EMPTY = new IContainer<Object>()
{
-
public Object[] getElements()
{
return NO_ELEMENTS;

Back to the top