Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-02-20 07:49:13 +0000
committerEike Stepper2010-02-20 07:49:13 +0000
commit5a194ef2ff97ad5387906c44cbb03763bde81f53 (patch)
treecab2e4faff42d92fb3530cdf80dedaa4344eb9c2
parentf4123bb44edeebaf9b3f031c67cebcddd100977c (diff)
downloadcdo-5a194ef2ff97ad5387906c44cbb03763bde81f53.tar.gz
cdo-5a194ef2ff97ad5387906c44cbb03763bde81f53.tar.xz
cdo-5a194ef2ff97ad5387906c44cbb03763bde81f53.zip
[256936] Support for Offline Mode
https://bugs.eclipse.org/bugs/show_bug.cgi?id=256936
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/RefreshSessionIndication.java4
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWLockManager.java34
-rw-r--r--releng/org.eclipse.emf.cdo.releng/build.xml2
3 files changed, 21 insertions, 19 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/RefreshSessionIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/RefreshSessionIndication.java
index 674dd6211c..e0e52d49d8 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/RefreshSessionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/RefreshSessionIndication.java
@@ -133,6 +133,8 @@ public class RefreshSessionIndication extends CDOReadIndication
private void writeRevisions(CDODataOutput out) throws IOException
{
InternalCDORevisionManager revisionManager = getRepository().getRevisionManager();
+ SyntheticCDORevision[] synthetics = new SyntheticCDORevision[1];
+
for (Entry<CDOBranch, List<CDORevisionKey>> entry : viewedRevisions.entrySet())
{
CDOBranch branch = entry.getKey();
@@ -141,7 +143,7 @@ public class RefreshSessionIndication extends CDOReadIndication
for (CDORevisionKey key : entry.getValue())
{
CDOID id = key.getID();
- SyntheticCDORevision[] synthetics = new SyntheticCDORevision[1];
+ synthetics[0] = null;
InternalCDORevision revision = revisionManager.getRevision(id, head, CDORevision.UNCHUNKED,
CDORevision.DEPTH_NONE, true, synthetics);
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 c005450bbb..e93a3eeeb1 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
@@ -37,6 +37,16 @@ public class RWLockManager<OBJECT, CONTEXT> extends Lifecycle implements IRWLock
{
private LockStrategy<OBJECT, CONTEXT> writeLockStrategy = new LockStrategy<OBJECT, CONTEXT>()
{
+ public boolean isLocked(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context)
+ {
+ return entry.isWriteLock(context);
+ }
+
+ public boolean isLockedByOthers(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context)
+ {
+ return entry.isWriteLockByOthers(context);
+ }
+
public boolean canObtainLock(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context)
{
return entry.canObtainWriteLock(context);
@@ -51,20 +61,20 @@ public class RWLockManager<OBJECT, CONTEXT> extends Lifecycle implements IRWLock
{
return entry.writeUnlock(context);
}
+ };
+ private LockStrategy<OBJECT, CONTEXT> readLockStrategy = new LockStrategy<OBJECT, CONTEXT>()
+ {
public boolean isLocked(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context)
{
- return entry.isWriteLock(context);
+ return entry.isReadLock(context);
}
public boolean isLockedByOthers(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context)
{
- return entry.isWriteLockByOthers(context);
+ return entry.isReadLockByOthers(context);
}
- };
- private LockStrategy<OBJECT, CONTEXT> readLockStrategy = new LockStrategy<OBJECT, CONTEXT>()
- {
public boolean canObtainLock(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context)
{
return entry.canObtainReadLock(context);
@@ -79,16 +89,6 @@ public class RWLockManager<OBJECT, CONTEXT> extends Lifecycle implements IRWLock
{
return entry.readUnlock(context);
}
-
- public boolean isLocked(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context)
- {
- return entry.isReadLock(context);
- }
-
- public boolean isLockedByOthers(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context)
- {
- return entry.isReadLockByOthers(context);
- }
};
private Map<OBJECT, LockEntry<OBJECT, CONTEXT>> lockEntries = new HashMap<OBJECT, LockEntry<OBJECT, CONTEXT>>();
@@ -337,13 +337,13 @@ public class RWLockManager<OBJECT, CONTEXT> extends Lifecycle implements IRWLock
{
public boolean isLocked(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context);
+ public boolean isLockedByOthers(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context);
+
public boolean canObtainLock(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context);
public LockEntry<OBJECT, CONTEXT> lock(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context);
public LockEntry<OBJECT, CONTEXT> unlock(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context);
-
- public boolean isLockedByOthers(LockEntry<OBJECT, CONTEXT> entry, CONTEXT context);
}
/**
diff --git a/releng/org.eclipse.emf.cdo.releng/build.xml b/releng/org.eclipse.emf.cdo.releng/build.xml
index 135ab27ec0..8dc3bf343a 100644
--- a/releng/org.eclipse.emf.cdo.releng/build.xml
+++ b/releng/org.eclipse.emf.cdo.releng/build.xml
@@ -91,7 +91,7 @@
<eclipse.launch app="buckminster">
<args>
<jvmarg value="-Dbugfix.288796=true" />
- <jvmarg value="-Xmx2048m" />
+ <jvmarg value="-Xmx3064m" />
<arg value="-data" />
<arg value="@{workspace}" />
<arg value="--loglevel" />

Back to the top