Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-12-08 07:39:19 +0000
committerEike Stepper2011-12-08 07:39:19 +0000
commitf3d3e6d3b7c451989fba78bdd80ad7751cb95c0f (patch)
treeeb2fa6dd912642f605eb2487f3f15971f33b5a79
parentc8b2dd559e7dcbc28bb1f8b3e9623d7a42165bea (diff)
downloadcdo-f3d3e6d3b7c451989fba78bdd80ad7751cb95c0f.tar.gz
cdo-f3d3e6d3b7c451989fba78bdd80ad7751cb95c0f.tar.xz
cdo-f3d3e6d3b7c451989fba78bdd80ad7751cb95c0f.zip
[365719] Disambiguate CDOView.enableDurableLocking(boolean)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=365719
-rw-r--r--plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleClient.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractSyncingTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerRestartTransactionTest.java66
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingNotificationsTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/OfflineLockingTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DisableViewDurabilityAction.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/EnableViewDurabilityAction.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java18
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java36
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java90
11 files changed, 160 insertions, 73 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleClient.java b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleClient.java
index 085dd6df71..631babaea1 100644
--- a/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleClient.java
+++ b/plugins/org.eclipse.emf.cdo.examples/src/org/eclipse/emf/cdo/examples/server/offline/OfflineExampleClient.java
@@ -191,7 +191,7 @@ public class OfflineExampleClient
System.out.println("Connected to " + repositoryInfo.getName());
tx = session.openTransaction();
- tx.enableDurableLocking(true);
+ tx.enableDurableLocking();
createSessionListener(session, autoMerging);
for (;;)
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
index 4a595ca14b..82d24768ab 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
@@ -196,11 +196,22 @@ public class ServerCDOView extends AbstractCDOView implements org.eclipse.emf.cd
return null;
}
+ @Deprecated
public String enableDurableLocking(boolean enable)
{
throw new UnsupportedOperationException();
}
+ public String enableDurableLocking()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void disableDurableLocking(boolean releaseLocks)
+ {
+ throw new UnsupportedOperationException();
+ }
+
public CDOFeatureAnalyzer getFeatureAnalyzer()
{
return CDOFeatureAnalyzer.NOOP;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractSyncingTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractSyncingTest.java
index d2b6d9202a..0554d3fdfb 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractSyncingTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractSyncingTest.java
@@ -250,7 +250,7 @@ public abstract class AbstractSyncingTest extends AbstractCDOTest
{
CDOTransaction tx = session.openTransaction();
tx.options().setLockNotificationEnabled(true);
- tx.enableDurableLocking(true);
+ tx.enableDurableLocking();
return tx;
}
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerRestartTransactionTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerRestartTransactionTest.java
index f75426db1f..0ddbfe189d 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerRestartTransactionTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerRestartTransactionTest.java
@@ -71,7 +71,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
public void testGetDurableLockingID() throws Exception
{
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
String actual = transaction.getDurableLockingID();
assertEquals(durableLockingID, actual);
@@ -83,21 +83,20 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
public void testKeepDurableLockingID() throws Exception
{
- String durableLockingID = transaction.enableDurableLocking(true);
- String actual = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
+ String actual = transaction.enableDurableLocking();
assertEquals(durableLockingID, actual);
restart(durableLockingID);
- actual = transaction.enableDurableLocking(true);
+ actual = transaction.enableDurableLocking();
assertEquals(durableLockingID, actual);
}
- public void testDeleteDurableLockingID() throws Exception
+ public void testDisableDurableLocking() throws Exception
{
- String durableLockingID = transaction.enableDurableLocking(true);
- String actual = transaction.enableDurableLocking(false);
- assertEquals(durableLockingID, actual);
+ String durableLockingID = transaction.enableDurableLocking();
+ transaction.disableDurableLocking(false);
assertEquals(null, transaction.getDurableLockingID());
try
@@ -111,13 +110,12 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
}
}
- public void testDeleteDurableLockingIDAfterRestart() throws Exception
+ public void testDisableDurableLockingAfterRestart() throws Exception
{
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
restart(durableLockingID);
- String actual = transaction.enableDurableLocking(false);
- assertEquals(durableLockingID, actual);
+ transaction.disableDurableLocking(false);
assertEquals(null, transaction.getDurableLockingID());
try
@@ -130,9 +128,23 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
}
}
+ public void testDisableDurableLockingAndReleaseLocks() throws Exception
+ {
+ Company company = getModel1Factory().createCompany();
+ resource.getContents().add(company);
+ transaction.commit();
+ readLock(company);
+
+ transaction.enableDurableLocking();
+ assertReadLock(true, company);
+
+ transaction.disableDurableLocking(true);
+ assertReadLock(false, company);
+ }
+
public void testWrongReadOnly() throws Exception
{
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
transaction.close();
try
@@ -147,7 +159,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
public void testWrongReadOnlyAfterRestart() throws Exception
{
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
restart(durableLockingID);
transaction.close();
@@ -163,7 +175,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
public void testDuplicateOpenView() throws Exception
{
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
try
{
@@ -177,7 +189,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
public void testDuplicateOpenViewAfterRestart() throws Exception
{
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
restart(durableLockingID);
try
@@ -196,7 +208,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
resource.getContents().add(company);
transaction.commit();
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
readLock(company);
restart(durableLockingID);
@@ -212,7 +224,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
transaction.commit();
readLock(company);
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
restart(durableLockingID);
@@ -226,7 +238,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
resource.getContents().add(company);
transaction.commit();
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
writeLock(company);
restart(durableLockingID);
@@ -242,7 +254,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
transaction.commit();
writeLock(company);
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
restart(durableLockingID);
@@ -256,7 +268,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
resource.getContents().add(company);
transaction.commit();
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
writeOption(company);
restart(durableLockingID);
@@ -272,7 +284,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
transaction.commit();
writeOption(company);
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
restart(durableLockingID);
@@ -286,7 +298,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
resource.getContents().add(company);
transaction.commit();
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
readLock(company);
writeLock(company);
@@ -304,7 +316,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
readLock(company);
writeLock(company);
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
restart(durableLockingID);
@@ -318,7 +330,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
resource.getContents().add(company);
transaction.commit();
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
readLock(company);
assertReadLock(true, company);
@@ -356,7 +368,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
writeUnlock(company);
assertReadLock(true, company);
assertWriteLock(false, company);
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
restart(durableLockingID);
@@ -373,7 +385,7 @@ public class LockingManagerRestartTransactionTest extends AbstractLockingTest
writeLock(company);
- String durableLockingID = transaction.enableDurableLocking(true);
+ String durableLockingID = transaction.enableDurableLocking();
final boolean[] gotCalled = { false };
getRepository().getLockingManager().addDurableViewHandler(new ILockingManager.DurableViewHandler()
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingNotificationsTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingNotificationsTest.java
index 240f243278..c3fd4031e5 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingNotificationsTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingNotificationsTest.java
@@ -391,7 +391,7 @@ public class LockingNotificationsTest extends AbstractLockingTest
{
CDOSession session1 = openSession();
CDOTransaction tx1 = session1.openTransaction();
- tx1.enableDurableLocking(true);
+ tx1.enableDurableLocking();
CDOResource res1 = tx1.createResource(getResourcePath("r1"));
Company company1 = getModel1Factory().createCompany();
res1.getContents().add(company1);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/OfflineLockingTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/OfflineLockingTest.java
index 9ef3f09941..dcdc01bb44 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/OfflineLockingTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/offline/OfflineLockingTest.java
@@ -41,7 +41,7 @@ public class OfflineLockingTest extends AbstractSyncingTest
waitForOnline(cloneSession.getRepositoryInfo());
CDOTransaction cloneTx = cloneSession.openTransaction();
- cloneTx.enableDurableLocking(true);
+ cloneTx.enableDurableLocking();
CDOResource res = cloneTx.createResource(getResourcePath("test"));
Company company = getModel1Factory().createCompany();
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DisableViewDurabilityAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DisableViewDurabilityAction.java
index 0677a35df1..3676cb7448 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DisableViewDurabilityAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/DisableViewDurabilityAction.java
@@ -34,6 +34,6 @@ public final class DisableViewDurabilityAction extends ViewAction
@Override
protected void doRun(IProgressMonitor progressMonitor) throws Exception
{
- getView().enableDurableLocking(false);
+ getView().disableDurableLocking(false);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/EnableViewDurabilityAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/EnableViewDurabilityAction.java
index fbbeb6a896..3f657c5e69 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/EnableViewDurabilityAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/EnableViewDurabilityAction.java
@@ -38,7 +38,7 @@ public final class EnableViewDurabilityAction extends ViewAction
@Override
protected void doRun(IProgressMonitor progressMonitor) throws Exception
{
- final String durableLockingID = getView().enableDurableLocking(true);
+ final String durableLockingID = getView().enableDurableLocking();
final Display display = getDisplay();
display.syncExec(new Runnable()
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java
index 9b82229983..6249811f59 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java
@@ -658,12 +658,30 @@ public class CDOPushTransaction extends Notifier implements CDOTransaction
/**
* @since 4.0
+ * @deprecated Use {@link #enableDurableLocking()} instead or {@link #disableDurableLocking(boolean)}, respectively.
*/
+ @Deprecated
public String enableDurableLocking(boolean enable)
{
return delegate.enableDurableLocking(enable);
}
+ /**
+ * @since 4.1
+ */
+ public String enableDurableLocking()
+ {
+ return delegate.enableDurableLocking();
+ }
+
+ /**
+ * @since 4.1
+ */
+ public void disableDurableLocking(boolean releaseLocks)
+ {
+ delegate.disableDurableLocking(releaseLocks);
+ }
+
public boolean isReadOnly()
{
return delegate.isReadOnly();
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 9fc743942b..1f421e906b 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
@@ -33,7 +33,6 @@ import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.util.ReadOnlyException;
import org.eclipse.net4j.util.collection.CloseableIterator;
-import org.eclipse.net4j.util.concurrent.IRWLockManager;
import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.event.INotifier;
import org.eclipse.net4j.util.options.IOptionsEvent;
@@ -356,23 +355,36 @@ public interface CDOView extends CDOCommonView, CDOUpdatable, INotifier
public void unlockObjects();
/**
- * Enables or disables the storage of all information that's needed to {@link CDOSession#openView(String) reopen} this
- * view at a later point in time. This information includes the {@link CDOBranchPoint branch point}, the user ID of
- * the {@link CDOSession session}, whether it's a read-only view or a {@link CDOTransaction transaction} and all the
- * locks that are acquired or will be acquired while durable locking is enabled.
+ * @since 4.0
+ * @deprecated Use {@link #enableDurableLocking()} instead or {@link #disableDurableLocking(boolean)}, respectively.
+ */
+ @Deprecated
+ public String enableDurableLocking(boolean enable);
+
+ /**
+ * Enables the storage of all information that's needed to {@link CDOSession#openView(String) reopen} this view at a
+ * later point in time. This information includes the {@link CDOBranchPoint branch point}, the user ID of the
+ * {@link CDOSession session}, whether it's a read-only view or a {@link CDOTransaction transaction} and all the locks
+ * that are acquired or will be acquired while durable locking is enabled.
*
* @see CDOSession#openView(String)
* @see CDOSession#openView(String, ResourceSet)
* @see CDOSession#openTransaction(String)
* @see CDOSession#openTransaction(String, ResourceSet)
- * @see #lockObjects(Collection, IRWLockManager.LockType, long)
- * @see #unlockObjects(Collection, IRWLockManager.LockType)
- * @see #unlockObjects()
- * @see CDOObject#cdoReadLock()
- * @see CDOObject#cdoWriteLock()
- * @since 4.0
+ * @see #disableDurableLocking(boolean)
+ * @since 4.1
*/
- public String enableDurableLocking(boolean enable);
+ public String enableDurableLocking();
+
+ /**
+ * Disables the storage of all information that's needed to {@link CDOSession#openView(String) reopen} this view at a
+ * later point in time. If such information is stored when this method is called it is removed. Note that locks
+ * acquired by this view are only released if <code>true</code> is passed to the <code>releaseLocks</code> parameter.
+ *
+ * @see #enableDurableLocking()
+ * @since 4.1
+ */
+ public void disableDurableLocking(boolean releaseLocks);
/**
* @since 3.0
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 50de3aeccb..3524857769 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
@@ -481,13 +481,14 @@ public class CDOViewImpl extends AbstractCDOView
unlockObjects(objects, lockType, false);
}
+ /**
+ * Note: This may get called with objects == null, and lockType == null, which is a request to remove all locks on all
+ * objects in this view.
+ */
public synchronized void unlockObjects(Collection<? extends CDOObject> objects, LockType lockType, boolean recursive)
{
checkActive();
- // Note: This may get called with objects == null, and lockType == null, which is a request
- // to remove all locks on all objects in this view.
-
List<CDOID> objectIDs = null;
List<CDOLockState> locksOnNewObjects = new LinkedList<CDOLockState>();
@@ -562,8 +563,20 @@ public class CDOViewImpl extends AbstractCDOView
return durableLockingID;
}
+ @Deprecated
public String enableDurableLocking(boolean enable)
{
+ if (enable)
+ {
+ return enableDurableLocking();
+ }
+
+ disableDurableLocking(false);
+ return null;
+ }
+
+ public String enableDurableLocking()
+ {
final String oldID = durableLockingID;
try
@@ -571,47 +584,68 @@ public class CDOViewImpl extends AbstractCDOView
synchronized (this)
{
CDOSessionProtocol sessionProtocol = session.getSessionProtocol();
- if (enable)
+ if (durableLockingID == null)
{
- if (durableLockingID == null)
- {
- durableLockingID = sessionProtocol.changeLockArea(this, true);
- }
-
- return durableLockingID;
+ durableLockingID = sessionProtocol.changeLockArea(this, true);
}
+ return durableLockingID;
+ }
+ }
+ finally
+ {
+ fireDurabilityChangedEvent(oldID);
+ }
+ }
+
+ public void disableDurableLocking(boolean releaseLocks)
+ {
+ final String oldID = durableLockingID;
+
+ try
+ {
+ synchronized (this)
+ {
+ CDOSessionProtocol sessionProtocol = session.getSessionProtocol();
if (durableLockingID != null)
{
sessionProtocol.changeLockArea(this, false);
durableLockingID = null;
- }
- return oldID;
+ if (releaseLocks)
+ {
+ unlockObjects();
+ }
+ }
}
}
finally
{
- if (!ObjectUtil.equals(oldID, durableLockingID))
+ fireDurabilityChangedEvent(oldID);
+ }
+ }
+
+ private void fireDurabilityChangedEvent(final String oldID)
+ {
+ if (!ObjectUtil.equals(oldID, durableLockingID))
+ {
+ fireEvent(new CDOViewDurabilityChangedEvent()
{
- fireEvent(new CDOViewDurabilityChangedEvent()
+ public CDOView getSource()
{
- public CDOView getSource()
- {
- return CDOViewImpl.this;
- }
+ return CDOViewImpl.this;
+ }
- public String getOldDurableLockingID()
- {
- return oldID;
- }
+ public String getOldDurableLockingID()
+ {
+ return oldID;
+ }
- public String getNewDurableLockingID()
- {
- return durableLockingID;
- }
- });
- }
+ public String getNewDurableLockingID()
+ {
+ return durableLockingID;
+ }
+ });
}
}

Back to the top