Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2016-02-11 11:10:12 +0000
committerEike Stepper2016-02-11 11:10:12 +0000
commit4a04c3539de2f376bcca79574d48a38705515afe (patch)
treebbbb4a625b3850fb1e66f952313a20239ad8a62a /plugins/org.eclipse.emf.cdo.server.net4j
parentf02905dd090d2949f28ff1c6737c98ac5a2dfcd8 (diff)
downloadcdo-4a04c3539de2f376bcca79574d48a38705515afe.tar.gz
cdo-4a04c3539de2f376bcca79574d48a38705515afe.tar.xz
cdo-4a04c3539de2f376bcca79574d48a38705515afe.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.java13
1 files changed, 7 insertions, 6 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 7277f935fa..b25f4a85eb 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
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.protocol.CDODataInput;
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.CDORevisionHandler;
import org.eclipse.emf.cdo.server.IUnit;
@@ -34,7 +35,7 @@ public class UnitIndication extends CDOServerReadIndicationWithMonitoring
private CDOID rootID;
- private byte opcode;
+ private UnitOpcode opcode;
public UnitIndication(CDOServerProtocol protocol)
{
@@ -46,7 +47,7 @@ public class UnitIndication extends CDOServerReadIndicationWithMonitoring
{
viewID = in.readInt();
rootID = in.readCDOID();
- opcode = in.readByte();
+ opcode = UnitOpcode.values()[in.readByte()];
}
@Override
@@ -55,13 +56,13 @@ public class UnitIndication extends CDOServerReadIndicationWithMonitoring
final InternalView view = getView(viewID);
IUnitManager unitManager = getRepository().getUnitManager();
- if (opcode == CDOProtocolConstants.UNIT_CHECK)
+ if (opcode == UnitOpcode.CHECK)
{
out.writeBoolean(unitManager.isUnit(rootID));
return;
}
- if (opcode == CDOProtocolConstants.UNIT_CLOSE)
+ if (opcode == UnitOpcode.CLOSE)
{
IUnit unit = unitManager.getUnit(rootID);
if (unit != null)
@@ -83,7 +84,7 @@ public class UnitIndication extends CDOServerReadIndicationWithMonitoring
try
{
- boolean success = view.openUnit(rootID, opcode == CDOProtocolConstants.UNIT_CREATE, new CDORevisionHandler()
+ boolean success = view.openUnit(rootID, opcode, new CDORevisionHandler()
{
public boolean handleRevision(CDORevision revision)
{
@@ -104,7 +105,7 @@ public class UnitIndication extends CDOServerReadIndicationWithMonitoring
return false;
}
- });
+ }, monitor);
if (ioException[0] != null)
{

Back to the top