Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2016-02-17 05:34:16 -0500
committerEike Stepper2016-02-17 05:34:16 -0500
commit72aa51d99b8dbc33e012e6d9c87b02beca196e4c (patch)
treeb514e4e55f07b3992d726c7a05e74179a1f8ae32 /plugins/org.eclipse.emf.cdo.server.net4j
parent575951a1cad4dbddf610c8290b6bf7f7831c4061 (diff)
downloadcdo-72aa51d99b8dbc33e012e6d9c87b02beca196e4c.tar.gz
cdo-72aa51d99b8dbc33e012e6d9c87b02beca196e4c.tar.xz
cdo-72aa51d99b8dbc33e012e6d9c87b02beca196e4c.zip
[486458] Provide support for optimized loading and notifying of object units
https://bugs.eclipse.org/bugs/show_bug.cgi?id=486458
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.net4j')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnitIndication.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnitIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnitIndication.java
index b25f4a85eb..65d7f79694 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnitIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnitIndication.java
@@ -16,9 +16,11 @@ import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants.UnitOpcode;
import org.eclipse.emf.cdo.common.revision.CDORevision;
+import org.eclipse.emf.cdo.common.revision.CDORevisionCache;
import org.eclipse.emf.cdo.common.revision.CDORevisionHandler;
import org.eclipse.emf.cdo.server.IUnit;
import org.eclipse.emf.cdo.server.IUnitManager;
+import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.server.InternalView;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
@@ -54,16 +56,19 @@ public class UnitIndication extends CDOServerReadIndicationWithMonitoring
protected void responding(final CDODataOutput out, OMMonitor monitor) throws Exception
{
final InternalView view = getView(viewID);
- IUnitManager unitManager = getRepository().getUnitManager();
+ final InternalRepository repository = getRepository();
if (opcode == UnitOpcode.CHECK)
{
- out.writeBoolean(unitManager.isUnit(rootID));
+ IUnitManager unitManager = repository.getUnitManager();
+ boolean isUnit = unitManager.isUnit(rootID);
+ out.writeBoolean(isUnit);
return;
}
if (opcode == UnitOpcode.CLOSE)
{
+ IUnitManager unitManager = repository.getUnitManager();
IUnit unit = unitManager.getUnit(rootID);
if (unit != null)
{
@@ -76,6 +81,7 @@ public class UnitIndication extends CDOServerReadIndicationWithMonitoring
return;
}
+ final CDORevisionCache revisionCache = repository.getRevisionManager().getCache();
final IOException[] ioException = { null };
final RuntimeException[] runtimeException = { null };
@@ -91,6 +97,8 @@ public class UnitIndication extends CDOServerReadIndicationWithMonitoring
try
{
view.unsubscribe(revision.getID());
+ revisionCache.addRevision(revision);
+
out.writeCDORevision(revision, CDORevision.UNCHUNKED); // Exposes revision to client side
return true;
}

Back to the top