Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2016-03-04 09:38:19 -0500
committerEike Stepper2016-03-04 09:38:19 -0500
commit6bd0c19fb99b0135b9b84ff12c378412a020ab8e (patch)
tree780ccf58456659f96540d53be9502465eeacde00
parent8b43765f99f4c846ab31d765bf310c51d18b4080 (diff)
downloadcdo-committers/estepper/bulk-inserts.tar.gz
cdo-committers/estepper/bulk-inserts.tar.xz
cdo-committers/estepper/bulk-inserts.zip
[Prototype] Bulk Insertscommitters/estepper/bulk-inserts
-rw-r--r--features/org.eclipse.emf.cdo.server.db4o-feature/CDOServer (DB4O).launch (renamed from features/org.eclipse.emf.cdo.server.db4o-feature/CDOServer_DB4O.launch)6
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.client/ExampleClient.launch4
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client/ExampleClient.launch4
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IClassMappingBulkSupport.java32
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IListMappingBulkSupport.java35
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IMappingStrategyBulkSupport.java35
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java75
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/IObjectTypeMapperBulkSupport.java34
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java167
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalMappingStrategy.java65
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AuditListTableMappingWithRanges.java49
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/DelegatingObjectTypeMapper.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditClassMapping.java335
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditMappingStrategyWithRanges.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingMappingStrategyWithRanges.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalMappingStrategy.java30
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/ObjectTypeTable.java84
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/StoreAccessor.java61
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/extra/UnitManagerMain.java4
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/BatchedStatement.java7
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java20
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/BatchedStatementImpl.java52
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RunnableWithName.java65
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/TimeoutMonitor.java4
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithMonitoring.java9
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java19
27 files changed, 981 insertions, 269 deletions
diff --git a/features/org.eclipse.emf.cdo.server.db4o-feature/CDOServer_DB4O.launch b/features/org.eclipse.emf.cdo.server.db4o-feature/CDOServer (DB4O).launch
index c0f7082bdb..b4ec87a8f5 100644
--- a/features/org.eclipse.emf.cdo.server.db4o-feature/CDOServer_DB4O.launch
+++ b/features/org.eclipse.emf.cdo.server.db4o-feature/CDOServer (DB4O).launch
@@ -10,7 +10,7 @@
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/CDOServer_DB4O"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/CDOServer (DB4O)"/>
<booleanAttribute key="default" value="false"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../ws-cdo.server"/>
@@ -25,8 +25,8 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<stringAttribute key="selectedPlugin" value="org.eclipse.emf.cdo"/>
-<stringAttribute key="selected_target_plugins" value="com.db4o@default:default,com.ibm.icu@default:default,com.mysql.jdbc@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.derby@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources.win32.x86_64@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.orbit.mongodb@default:default,org.eclipse.osgi.compatibility.state@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.team.core@default:default,org.h2@default:default,org.hsqldb@default:default,org.postgresql@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.server.db4o@default:default,org.eclipse.emf.cdo.server.db@default:default,org.eclipse.emf.cdo.server.mongodb@default:default,org.eclipse.emf.cdo.server.net4j@default:default,org.eclipse.emf.cdo.server@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.db.derby@default:default,org.eclipse.net4j.db.h2@default:default,org.eclipse.net4j.db.hsqldb@default:default,org.eclipse.net4j.db.jdbc@default:default,org.eclipse.net4j.db.mysql@default:default,org.eclipse.net4j.db.postgresql@default:default,org.eclipse.net4j.db@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.db4o,com.ibm.icu@default:default,com.mysql.jdbc,javax.servlet@default:default,javax.xml@default:default,org.apache.derby,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.orbit.mongodb,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.team.core@default:default,org.h2,org.hsqldb,org.postgresql"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:false,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.server,org.eclipse.emf.cdo.server.db,org.eclipse.emf.cdo.server.db4o,org.eclipse.emf.cdo.server.mongodb,org.eclipse.emf.cdo.server.net4j,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.db,org.eclipse.net4j.db.derby,org.eclipse.net4j.db.h2,org.eclipse.net4j.db.hsqldb,org.eclipse.net4j.db.jdbc,org.eclipse.net4j.db.mysql,org.eclipse.net4j.db.postgresql,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="tracing" value="true"/>
diff --git a/plugins/org.eclipse.emf.cdo.examples.client/ExampleClient.launch b/plugins/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
index 39b2ae3b3a..9642dadf30 100644
--- a/plugins/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
+++ b/plugins/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
@@ -21,8 +21,8 @@
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:/org.eclipse.emf.cdo.examples.client}"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.team@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.ide@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:false,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
<booleanAttribute key="show_selected_only" value="true"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="tracing" value="true"/>
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client/ExampleClient.launch b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
index e00bb4b846..135e4f9784 100644
--- a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
+++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.client/ExampleClient.launch
@@ -21,8 +21,8 @@
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:/org.eclipse.emf.cdo.examples.client}"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default,org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.team@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.ide@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default,org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:default,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.team@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.ide@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default,org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:false,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.lucene.analysis@default:default,org.apache.lucene.core@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.compare@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86_64@default:false,org.eclipse.core.net@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.bidi@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.event@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86_64@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.util@default:default,org.eclipse.help.base@default:default,org.eclipse.help.ui@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.compatibility.state@default:false,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.platform@default:default,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.text@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.ui.intro@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default,org.eclipse.emf.cdo.admin@default:default,org.eclipse.emf.cdo.common@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:false,org.eclipse.emf.cdo.edit@default:default,org.eclipse.emf.cdo.examples.client@default:default,org.eclipse.emf.cdo.examples.company.edit@default:default,org.eclipse.emf.cdo.examples.company@default:default,org.eclipse.emf.cdo.expressions.edit@default:default,org.eclipse.emf.cdo.expressions@default:default,org.eclipse.emf.cdo.net4j@default:default,org.eclipse.emf.cdo.security.edit@default:default,org.eclipse.emf.cdo.security@default:default,org.eclipse.emf.cdo.transfer.repository@default:default,org.eclipse.emf.cdo.transfer.ui@default:default,org.eclipse.emf.cdo.transfer.workspace@default:default,org.eclipse.emf.cdo.transfer@default:default,org.eclipse.emf.cdo.ui.admin@default:default,org.eclipse.emf.cdo.ui.shared@default:default,org.eclipse.emf.cdo.ui@default:default,org.eclipse.emf.cdo@default:default,org.eclipse.net4j.jvm@default:default,org.eclipse.net4j.tcp@default:default,org.eclipse.net4j.ui.shared@default:default,org.eclipse.net4j.ui@default:default,org.eclipse.net4j.util.ui@default:default,org.eclipse.net4j.util@default:default,org.eclipse.net4j@default:default"/>
<booleanAttribute key="show_selected_only" value="true"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="tracing" value="true"/>
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IClassMappingBulkSupport.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IClassMappingBulkSupport.java
new file mode 100644
index 0000000000..1d2e6a6bc3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IClassMappingBulkSupport.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2016 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.server.db.mapping;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+
+import org.eclipse.net4j.util.om.monitor.OMMonitor;
+
+import java.sql.SQLException;
+import java.util.List;
+
+/**
+ * An extension interface for {@link IClassMapping class mappings} that support <i>bulk inserts</i>.
+ *
+ * @author Eike Stepper
+ * @since 4.4
+ */
+public interface IClassMappingBulkSupport extends IClassMapping
+{
+ public void writeBulkRevisions(IDBStoreAccessor accessor, List<InternalCDORevision> revisions, CDOBranch branch,
+ long timeStamp, OMMonitor monitor) throws SQLException;
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IListMappingBulkSupport.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IListMappingBulkSupport.java
new file mode 100644
index 0000000000..2b01146d4f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IListMappingBulkSupport.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2016 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.server.db.mapping;
+
+import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
+import org.eclipse.emf.cdo.server.db.IIDHandler;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+
+import org.eclipse.net4j.db.BatchedStatement;
+import org.eclipse.net4j.db.IDBPreparedStatement;
+import org.eclipse.net4j.util.collection.MoveableList;
+
+import java.sql.SQLException;
+
+/**
+ * Interface to complement {@link IListMapping} in order to provide bulk insert support.
+ *
+ * @author Eike Stepper
+ * @since 4.4
+ */
+public interface IListMappingBulkSupport extends IListMapping
+{
+ public IDBPreparedStatement getInsertEntryStatement(IDBStoreAccessor accessor) throws SQLException;
+
+ public void writeBulkValues(BatchedStatement stmt, IIDHandler idHandler, InternalCDORevision revision,
+ MoveableList<Object> list) throws SQLException;
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IMappingStrategyBulkSupport.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IMappingStrategyBulkSupport.java
new file mode 100644
index 0000000000..3a6d5e767e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IMappingStrategyBulkSupport.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2016 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.server.db.mapping;
+
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+
+import org.eclipse.net4j.util.om.monitor.OMMonitor;
+
+import org.eclipse.emf.ecore.EClass;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Eike Stepper
+ * @since 4.4
+ */
+public interface IMappingStrategyBulkSupport extends IMappingStrategy
+{
+ public boolean hasBulkSupport();
+
+ public void writeBulkRevisions(IDBStoreAccessor accessor, Map<EClass, List<InternalCDORevision>> revisionsPerClass,
+ Map<CDOID, EClass> newObjectTypes, CDOBranch branch, long timeStamp, OMMonitor monitor);
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
index 80f45e7846..f2eda0e2a9 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
@@ -48,6 +48,7 @@ import org.eclipse.emf.cdo.server.db.mapping.IClassMapping;
import org.eclipse.emf.cdo.server.db.mapping.IClassMappingAuditSupport;
import org.eclipse.emf.cdo.server.db.mapping.IClassMappingDeltaSupport;
import org.eclipse.emf.cdo.server.db.mapping.IMappingStrategy;
+import org.eclipse.emf.cdo.server.db.mapping.IMappingStrategyBulkSupport;
import org.eclipse.emf.cdo.server.internal.db.bundle.OM;
import org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping;
import org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.UnitMappingTable;
@@ -106,6 +107,7 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -166,7 +168,7 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
public IDBPreparedStatement getPreparedStatement(String sql, ReuseProbability reuseProbability)
{
org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability converted = //
- org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability.values()[reuseProbability.ordinal()];
+ org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability.values()[reuseProbability.ordinal()];
return connection.prepareStatement(sql, converted);
}
@@ -542,6 +544,7 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
}
monitor.begin(revisionDeltas.length);
+
try
{
for (InternalCDORevisionDelta delta : revisionDeltas)
@@ -557,6 +560,9 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
protected void writeRevisionDelta(InternalCDORevisionDelta delta, long created, OMMonitor monitor)
{
+ int xxx;
+ // eClass ?= delta.getEClass()
+
CDOID id = delta.getID();
EClass eClass = getObjectType(id);
IClassMappingDeltaSupport mapping = (IClassMappingDeltaSupport)getStore().getMappingStrategy()
@@ -611,6 +617,71 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
throw new UnsupportedOperationException();
}
+ @Override
+ protected void writeNewAndDirtyRevisions(InternalCommitContext context, boolean deltas, CDOBranch branch,
+ long timeStamp, OMMonitor monitor)
+ {
+ IMappingStrategy mappingStrategy = getStore().getMappingStrategy();
+ if (mappingStrategy instanceof IMappingStrategyBulkSupport
+ && !"true".equalsIgnoreCase(mappingStrategy.getProperties().get("disableBulkInserts")))
+ {
+ IMappingStrategyBulkSupport bulkSupport = (IMappingStrategyBulkSupport)mappingStrategy;
+ if (bulkSupport.hasBulkSupport())
+ {
+ Map<EClass, List<InternalCDORevision>> revisionsPerClass = new HashMap<EClass, List<InternalCDORevision>>();
+ Map<CDOID, EClass> newObjectTypes = new HashMap<CDOID, EClass>();
+
+ InternalCDORevision[] newObjects = context.getNewObjects();
+ classifyRevisions(newObjects, revisionsPerClass, newObjectTypes);
+ int count = newObjects.length;
+
+ if (!deltas)
+ {
+ InternalCDORevision[] dirtyObjects = context.getDirtyObjects();
+ classifyRevisions(dirtyObjects, revisionsPerClass, null);
+ count += dirtyObjects.length;
+ }
+
+ bulkSupport.writeBulkRevisions(this, revisionsPerClass, newObjectTypes, branch, timeStamp, monitor.fork(count));
+
+ if (deltas)
+ {
+ InternalCDORevisionDelta[] dirtyObjectDeltas = context.getDirtyObjectDeltas();
+ if (dirtyObjectDeltas.length != 0)
+ {
+ writeRevisionDeltas(dirtyObjectDeltas, branch, timeStamp, monitor.fork(dirtyObjectDeltas.length));
+ }
+ }
+
+ return;
+ }
+ }
+
+ super.writeNewAndDirtyRevisions(context, deltas, branch, timeStamp, monitor);
+ }
+
+ private void classifyRevisions(InternalCDORevision[] revisions,
+ Map<EClass, List<InternalCDORevision>> revisionsPerClass, Map<CDOID, EClass> newObjectTypes)
+ {
+ for (InternalCDORevision revision : revisions)
+ {
+ EClass eClass = revision.getEClass();
+ if (newObjectTypes != null)
+ {
+ newObjectTypes.put(revision.getID(), eClass);
+ }
+
+ List<InternalCDORevision> list = revisionsPerClass.get(eClass);
+ if (list == null)
+ {
+ list = new ArrayList<InternalCDORevision>();
+ revisionsPerClass.put(eClass, list);
+ }
+
+ list.add(revision);
+ }
+ }
+
protected void writeRevision(InternalCDORevision revision, boolean mapType, boolean revise, OMMonitor monitor)
{
if (TRACER.isEnabled())
@@ -1308,7 +1379,7 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
Connection connection = getConnection();
Collection<InternalCDOPackageUnit> imported = //
- metaDataManager.rawImport(connection, in, fromCommitTime, toCommitTime, monitor.fork());
+ metaDataManager.rawImport(connection, in, fromCommitTime, toCommitTime, monitor.fork());
packageUnits.addAll(imported);
if (!packageUnits.isEmpty())
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/IObjectTypeMapperBulkSupport.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/IObjectTypeMapperBulkSupport.java
new file mode 100644
index 0000000000..cd29242001
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/IObjectTypeMapperBulkSupport.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2011-2013 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
+ * Stefan Winkler - 271444: [DB] Multiple refactorings bug 271444
+ */
+package org.eclipse.emf.cdo.server.internal.db;
+
+import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
+
+import org.eclipse.net4j.util.om.monitor.OMMonitor;
+
+import org.eclipse.emf.ecore.EClass;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Eike Stepper
+ * @since 4.0
+ */
+public interface IObjectTypeMapperBulkSupport extends IObjectTypeMapper
+{
+ public boolean hasBulkSupport();
+
+ public Set<CDOID> putObjectTypes(IDBStoreAccessor accessor, Map<CDOID, EClass> newObjectTypes, long timeStamp,
+ OMMonitor monitor);
+}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java
index 5762203925..5a0cdaa592 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java
@@ -36,6 +36,7 @@ import org.eclipse.emf.cdo.server.db.IMetaDataManager;
import org.eclipse.emf.cdo.server.db.mapping.IClassMapping;
import org.eclipse.emf.cdo.server.db.mapping.IListMapping;
import org.eclipse.emf.cdo.server.db.mapping.IMappingStrategy;
+import org.eclipse.emf.cdo.server.db.mapping.IMappingStrategyBulkSupport;
import org.eclipse.emf.cdo.server.db.mapping.ITypeMapping;
import org.eclipse.emf.cdo.server.internal.db.DBAnnotation;
import org.eclipse.emf.cdo.server.internal.db.ObjectIDIterator;
@@ -43,6 +44,7 @@ import org.eclipse.emf.cdo.spi.common.commit.CDOChangeSetSegment;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageInfo;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.net4j.db.DBException;
@@ -92,7 +94,7 @@ import java.util.concurrent.Semaphore;
* @author Eike Stepper
* @since 2.0
*/
-public abstract class AbstractMappingStrategy extends Lifecycle implements IMappingStrategy
+public abstract class AbstractMappingStrategy extends Lifecycle implements IMappingStrategyBulkSupport
{
// --------- database name generation strings --------------
protected static final String NAME_SEPARATOR = "_"; //$NON-NLS-1$
@@ -829,6 +831,17 @@ public abstract class AbstractMappingStrategy extends Lifecycle implements IMapp
public abstract IListMapping doCreateFeatureMapMapping(EClass containingClass, EStructuralFeature feature);
+ public boolean hasBulkSupport()
+ {
+ return false;
+ }
+
+ public void writeBulkRevisions(IDBStoreAccessor accessor, Map<EClass, List<InternalCDORevision>> revisionsPerClass,
+ Map<CDOID, EClass> newObjectTypes, CDOBranch branch, long timeStamp, OMMonitor monitor)
+ {
+ throw new UnsupportedOperationException();
+ }
+
@Override
protected void doDeactivate() throws Exception
{
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java
index 1283af5e69..69acfea09e 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java
@@ -27,18 +27,22 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionManager;
import org.eclipse.emf.cdo.eresource.EresourcePackage;
import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.server.IStoreAccessor.QueryXRefsContext;
+import org.eclipse.emf.cdo.server.StoreThreadLocal;
import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
import org.eclipse.emf.cdo.server.db.IIDHandler;
import org.eclipse.emf.cdo.server.db.mapping.IClassMapping;
import org.eclipse.emf.cdo.server.db.mapping.IListMapping;
import org.eclipse.emf.cdo.server.db.mapping.IListMapping3;
+import org.eclipse.emf.cdo.server.db.mapping.IListMappingUnitSupport;
import org.eclipse.emf.cdo.server.db.mapping.IMappingStrategy;
import org.eclipse.emf.cdo.server.db.mapping.ITypeMapping;
+import org.eclipse.emf.cdo.server.internal.db.DBStore;
import org.eclipse.emf.cdo.server.internal.db.bundle.OM;
import org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy;
import org.eclipse.emf.cdo.spi.common.commit.CDOChangeSetSegment;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDOList;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+import org.eclipse.emf.cdo.spi.common.revision.StubCDORevision;
import org.eclipse.net4j.db.DBException;
import org.eclipse.net4j.db.DBType;
@@ -52,6 +56,10 @@ import org.eclipse.net4j.db.ddl.IDBIndex;
import org.eclipse.net4j.db.ddl.IDBSchema;
import org.eclipse.net4j.db.ddl.IDBTable;
import org.eclipse.net4j.spi.db.ddl.InternalDBIndex;
+import org.eclipse.net4j.util.WrappedException;
+import org.eclipse.net4j.util.collection.MoveableList;
+import org.eclipse.net4j.util.concurrent.RunnableWithName;
+import org.eclipse.net4j.util.concurrent.TimeoutRuntimeException;
import org.eclipse.net4j.util.lifecycle.IDeactivateable;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.monitor.OMMonitor.Async;
@@ -76,6 +84,10 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
/**
* @author Eike Stepper
@@ -1016,4 +1028,159 @@ public abstract class AbstractHorizontalClassMapping implements IClassMapping, I
}
}
}
+
+ /**
+ * @author Eike Stepper
+ */
+ protected abstract class AsnychronousListIO<T extends IListMapping> extends RunnableWithName
+ {
+ protected final IDBStoreAccessor accessor;
+
+ protected final DBStore store;
+
+ protected final IIDHandler idHandler;
+
+ protected final IListMapping[] listMappings;
+
+ private final BlockingQueue<InternalCDORevision> queue = new LinkedBlockingQueue<InternalCDORevision>();
+
+ private final CountDownLatch latch = new CountDownLatch(1);
+
+ private Throwable exception;
+
+ public AsnychronousListIO(IDBStoreAccessor accessor)
+ {
+ this.accessor = accessor;
+ store = (DBStore)accessor.getStore();
+ idHandler = store.getIDHandler();
+
+ List<IListMapping> tmp = getListMappings();
+ listMappings = new IListMappingUnitSupport[tmp.size()];
+
+ int i = 0;
+ for (IListMapping listMapping : tmp)
+ {
+ listMappings[i++] = listMapping;
+ }
+ }
+
+ @Override
+ public String getName()
+ {
+ return getClass().getName();
+ }
+
+ public void schedule(InternalCDORevision revision)
+ {
+ queue.offer(revision);
+ }
+
+ public void await(OMMonitor monitor) throws SQLException
+ {
+ // Schedule an end marker revision.
+ schedule(new StubCDORevision(getEClass()));
+
+ Async async = monitor != null ? monitor.forkAsync() : null;
+
+ try
+ {
+ while (!latch.await(100, TimeUnit.MILLISECONDS))
+ {
+ if (monitor != null)
+ {
+ monitor.checkCanceled();
+ }
+ }
+ }
+ catch (InterruptedException ex)
+ {
+ throw new TimeoutRuntimeException();
+ }
+ finally
+ {
+ if (async != null)
+ {
+ async.stop();
+ }
+
+ closeStatements(monitor);
+ }
+
+ if (exception instanceof RuntimeException)
+ {
+ throw (RuntimeException)exception;
+ }
+
+ if (exception instanceof Error)
+ {
+ throw (Error)exception;
+ }
+
+ if (exception instanceof SQLException)
+ {
+ throw (SQLException)exception;
+ }
+
+ if (exception instanceof Exception)
+ {
+ throw WrappedException.wrap((Exception)exception);
+ }
+ }
+
+ @Override
+ protected void doRun()
+ {
+ StoreThreadLocal.setAccessor(accessor);
+
+ try
+ {
+ while (store.isActive())
+ {
+ InternalCDORevision revision = queue.poll(1, TimeUnit.SECONDS);
+ if (revision == null)
+ {
+ continue;
+ }
+
+ if (revision instanceof StubCDORevision)
+ {
+ return;
+ }
+
+ runWithRevision(revision);
+ }
+ }
+ catch (Throwable ex)
+ {
+ exception = ex;
+ }
+ finally
+ {
+ latch.countDown();
+ StoreThreadLocal.remove();
+ }
+ }
+
+ protected void runWithRevision(InternalCDORevision revision) throws SQLException
+ {
+ for (int i = 0; i < listMappings.length; i++)
+ {
+ @SuppressWarnings("unchecked")
+ T listMapping = (T)listMappings[i];
+
+ EStructuralFeature feature = listMapping.getFeature();
+ MoveableList<Object> list = revision.getList(feature);
+
+ if (list.size() != 0)
+ {
+ runWithList(revision, i, listMapping, list);
+ }
+ }
+ }
+
+ protected abstract void runWithList(InternalCDORevision revision, int i, T listMapping, MoveableList<Object> list)
+ throws SQLException;
+
+ protected abstract void closeStatements(OMMonitor monitor) throws SQLException;
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalMappingStrategy.java
index 8e3d98a136..509309e198 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalMappingStrategy.java
@@ -12,6 +12,7 @@
package org.eclipse.emf.cdo.server.internal.db.mapping.horizontal;
import org.eclipse.emf.cdo.common.CDOCommonRepository.IDGenerationLocation;
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.id.CDOID;
import org.eclipse.emf.cdo.common.model.CDOClassifierRef;
import org.eclipse.emf.cdo.common.protocol.CDODataInput;
@@ -26,11 +27,14 @@ import org.eclipse.emf.cdo.server.db.IDBStore;
import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
import org.eclipse.emf.cdo.server.db.IIDHandler;
import org.eclipse.emf.cdo.server.db.mapping.IClassMapping;
+import org.eclipse.emf.cdo.server.db.mapping.IClassMappingBulkSupport;
import org.eclipse.emf.cdo.server.db.mapping.IListMapping;
import org.eclipse.emf.cdo.server.internal.db.CDODBSchema;
import org.eclipse.emf.cdo.server.internal.db.IObjectTypeMapper;
+import org.eclipse.emf.cdo.server.internal.db.IObjectTypeMapperBulkSupport;
import org.eclipse.emf.cdo.server.internal.db.bundle.OM;
import org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.net4j.db.DBException;
import org.eclipse.net4j.db.DBUtil;
@@ -52,6 +56,8 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.Collection;
import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
/**
* * This abstract base class refines {@link AbstractMappingStrategy} by implementing aspects common to horizontal
@@ -370,6 +376,46 @@ public abstract class AbstractHorizontalMappingStrategy extends AbstractMappingS
}
@Override
+ public void writeBulkRevisions(IDBStoreAccessor accessor, Map<EClass, List<InternalCDORevision>> revisionsPerClass,
+ Map<CDOID, EClass> newObjectTypes, CDOBranch branch, long timeStamp, OMMonitor monitor)
+ {
+ monitor.begin(revisionsPerClass.size() + (newObjectTypes.isEmpty() ? 0 : 1));
+
+ try
+ {
+ for (Entry<EClass, List<InternalCDORevision>> entry : revisionsPerClass.entrySet())
+ {
+ EClass eClass = entry.getKey();
+ List<InternalCDORevision> revisions = entry.getValue();
+
+ IClassMappingBulkSupport classMapping = (IClassMappingBulkSupport)getClassMapping(eClass);
+ classMapping.writeBulkRevisions(accessor, revisions, branch, timeStamp, monitor.fork());
+ }
+
+ if (!newObjectTypes.isEmpty())
+ {
+ if (objectTypeMapper instanceof IObjectTypeMapperBulkSupport)
+ {
+ IObjectTypeMapperBulkSupport bulkSupport = (IObjectTypeMapperBulkSupport)objectTypeMapper;
+ bulkSupport.putObjectTypes(accessor, newObjectTypes, timeStamp, monitor.fork());
+ }
+ else
+ {
+ putObjectTypes(accessor, newObjectTypes, timeStamp, monitor.fork());
+ }
+ }
+ }
+ catch (SQLException ex)
+ {
+ throw new DBException(ex);
+ }
+ finally
+ {
+ monitor.done();
+ }
+ }
+
+ @Override
protected void doActivate() throws Exception
{
super.doActivate();
@@ -426,6 +472,25 @@ public abstract class AbstractHorizontalMappingStrategy extends AbstractMappingS
return objectTypeCacheSize;
}
+ private void putObjectTypes(IDBStoreAccessor accessor, Map<CDOID, EClass> newObjectTypes, long timeStamp,
+ OMMonitor monitor)
+ {
+ monitor.begin(newObjectTypes.size());
+
+ try
+ {
+ for (Entry<CDOID, EClass> entry : newObjectTypes.entrySet())
+ {
+ putObjectType(accessor, timeStamp, entry.getKey(), entry.getValue());
+ monitor.worked();
+ }
+ }
+ finally
+ {
+ monitor.done();
+ }
+ }
+
/**
* This is an intermediate implementation. It should be changed after classmappings support a general way to implement
* queries ...
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AuditListTableMappingWithRanges.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AuditListTableMappingWithRanges.java
index d01923dbe2..da3332ed70 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AuditListTableMappingWithRanges.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AuditListTableMappingWithRanges.java
@@ -37,6 +37,7 @@ import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
import org.eclipse.emf.cdo.server.db.IDBStoreChunkReader;
import org.eclipse.emf.cdo.server.db.IIDHandler;
import org.eclipse.emf.cdo.server.db.mapping.IClassMapping;
+import org.eclipse.emf.cdo.server.db.mapping.IListMappingBulkSupport;
import org.eclipse.emf.cdo.server.db.mapping.IListMappingDeltaSupport;
import org.eclipse.emf.cdo.server.db.mapping.IListMappingUnitSupport;
import org.eclipse.emf.cdo.server.db.mapping.IMappingStrategy;
@@ -45,6 +46,7 @@ import org.eclipse.emf.cdo.server.internal.db.bundle.OM;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
+import org.eclipse.net4j.db.BatchedStatement;
import org.eclipse.net4j.db.DBException;
import org.eclipse.net4j.db.DBType;
import org.eclipse.net4j.db.DBUtil;
@@ -61,6 +63,7 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
+import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collection;
@@ -71,7 +74,7 @@ import java.util.List;
* This is a list-table mapping for audit mode. It is optimized for frequent insert operations at the list's end, which
* causes just 1 DB row to be changed. This is achieved by introducing a version range (columns cdo_version_added and
* cdo_version_removed) which records for which revisions a particular entry existed. Also, this mapping is mainly
- * optimized for potentially very large lists: the need for having the complete list stored in memopy to do
+ * optimized for potentially very large lists: the need for having the complete list stored in memory to do
* in-the-middle-moved and inserts is traded in for a few more DB access operations.
*
* @author Eike Stepper
@@ -79,7 +82,7 @@ import java.util.List;
* @author Lothar Werzinger
*/
public class AuditListTableMappingWithRanges extends AbstractBasicListTableMapping
- implements IListMappingDeltaSupport, IListMappingUnitSupport
+ implements IListMappingDeltaSupport, IListMappingUnitSupport, IListMappingBulkSupport
{
private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, AuditListTableMappingWithRanges.class);
@@ -598,6 +601,25 @@ public class AuditListTableMappingWithRanges extends AbstractBasicListTableMappi
}
}
+ public IDBPreparedStatement getInsertEntryStatement(IDBStoreAccessor accessor)
+ {
+ return accessor.getDBConnection().prepareStatement(sqlInsertEntry, ReuseProbability.HIGH);
+ }
+
+ public void writeBulkValues(BatchedStatement stmt, IIDHandler idHandler, InternalCDORevision revision,
+ MoveableList<Object> list) throws SQLException
+ {
+ CDOID id = revision.getID();
+ int version = revision.getVersion();
+ int index = 0;
+
+ for (Object value : list)
+ {
+ addEntry(stmt, idHandler, id, version, index++, value);
+ stmt.executeUpdate();
+ }
+ }
+
private void addEntry(IDBStoreAccessor accessor, CDOID id, int version, int index, Object value)
{
if (TRACER.isEnabled())
@@ -607,16 +629,11 @@ public class AuditListTableMappingWithRanges extends AbstractBasicListTableMappi
}
IIDHandler idHandler = getMappingStrategy().getStore().getIDHandler();
- IDBPreparedStatement stmt = accessor.getDBConnection().prepareStatement(sqlInsertEntry, ReuseProbability.HIGH);
+ IDBPreparedStatement stmt = getInsertEntryStatement(accessor);
try
{
- int column = 1;
- idHandler.setCDOID(stmt, column++, id);
- stmt.setInt(column++, version);
- stmt.setInt(column++, index);
- typeMapping.setValue(stmt, column++, value);
-
+ addEntry(stmt, idHandler, id, version, index, value);
DBUtil.update(stmt, true);
}
catch (SQLException e)
@@ -633,6 +650,16 @@ public class AuditListTableMappingWithRanges extends AbstractBasicListTableMappi
}
}
+ private void addEntry(PreparedStatement stmt, IIDHandler idHandler, CDOID id, int version, int index, Object value)
+ throws SQLException
+ {
+ int column = 1;
+ idHandler.setCDOID(stmt, column++, id);
+ stmt.setInt(column++, version);
+ stmt.setInt(column++, index);
+ typeMapping.setValue(stmt, column++, value);
+ }
+
private void removeEntry(IDBStoreAccessor accessor, CDOID id, int oldVersion, int newVersion, int index)
{
if (TRACER.isEnabled())
@@ -828,12 +855,10 @@ public class AuditListTableMappingWithRanges extends AbstractBasicListTableMappi
InternalCDORevision originalRevision = (InternalCDORevision)repo.getRevisionManager().getRevision(id,
repo.getBranchManager().getMainBranch().getHead(), /* chunksize = */0, CDORevision.DEPTH_NONE, true);
- int oldListSize = originalRevision.getList(getFeature()).size();
-
if (TRACER.isEnabled())
{
TRACER.format("ListTableMapping.processDelta for revision {0} - previous list size: {1}", originalRevision, //$NON-NLS-1$
- oldListSize);
+ originalRevision.getList(getFeature()).size());
}
// let the visitor collect the changes
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/DelegatingObjectTypeMapper.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/DelegatingObjectTypeMapper.java
index d17ebbe6fd..04dfa6b365 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/DelegatingObjectTypeMapper.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/DelegatingObjectTypeMapper.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
import org.eclipse.emf.cdo.server.db.IIDHandler;
import org.eclipse.emf.cdo.server.internal.db.IObjectTypeMapper;
+import org.eclipse.emf.cdo.server.internal.db.IObjectTypeMapperBulkSupport;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
@@ -25,12 +26,15 @@ import org.eclipse.emf.ecore.EClass;
import java.io.IOException;
import java.sql.Connection;
+import java.util.Map;
+import java.util.Set;
/**
* @author Eike Stepper
* @since 4.0
*/
public abstract class DelegatingObjectTypeMapper extends AbstractObjectTypeMapper
+ implements IObjectTypeMapperBulkSupport
{
private IObjectTypeMapper delegate;
@@ -99,6 +103,29 @@ public abstract class DelegatingObjectTypeMapper extends AbstractObjectTypeMappe
delegate.rawImport(connection, in, monitor);
}
+ public boolean hasBulkSupport()
+ {
+ if (delegate instanceof IObjectTypeMapperBulkSupport)
+ {
+ IObjectTypeMapperBulkSupport bulkSupport = (IObjectTypeMapperBulkSupport)delegate;
+ return bulkSupport.hasBulkSupport();
+ }
+
+ return false;
+ }
+
+ public Set<CDOID> putObjectTypes(IDBStoreAccessor accessor, Map<CDOID, EClass> newObjectTypes, long timeStamp,
+ OMMonitor monitor)
+ {
+ if (delegate instanceof IObjectTypeMapperBulkSupport)
+ {
+ IObjectTypeMapperBulkSupport bulkSupport = (IObjectTypeMapperBulkSupport)delegate;
+ return bulkSupport.putObjectTypes(accessor, newObjectTypes, timeStamp, monitor);
+ }
+
+ throw new UnsupportedOperationException();
+ }
+
@Override
protected void doBeforeActivate() throws Exception
{
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditClassMapping.java
index fb0e6adcf3..830084bda8 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditClassMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditClassMapping.java
@@ -31,14 +31,16 @@ import org.eclipse.emf.cdo.common.revision.delta.CDORemoveFeatureDelta;
import org.eclipse.emf.cdo.common.revision.delta.CDOSetFeatureDelta;
import org.eclipse.emf.cdo.common.revision.delta.CDOUnsetFeatureDelta;
import org.eclipse.emf.cdo.eresource.EresourcePackage;
+import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.server.IStoreAccessor.QueryXRefsContext;
-import org.eclipse.emf.cdo.server.StoreThreadLocal;
+import org.eclipse.emf.cdo.server.db.IDBStore;
import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
import org.eclipse.emf.cdo.server.db.IIDHandler;
import org.eclipse.emf.cdo.server.db.mapping.IClassMappingAuditSupport;
+import org.eclipse.emf.cdo.server.db.mapping.IClassMappingBulkSupport;
import org.eclipse.emf.cdo.server.db.mapping.IClassMappingDeltaSupport;
import org.eclipse.emf.cdo.server.db.mapping.IClassMappingUnitSupport;
-import org.eclipse.emf.cdo.server.db.mapping.IListMapping;
+import org.eclipse.emf.cdo.server.db.mapping.IListMappingBulkSupport;
import org.eclipse.emf.cdo.server.db.mapping.IListMappingDeltaSupport;
import org.eclipse.emf.cdo.server.db.mapping.IListMappingUnitSupport;
import org.eclipse.emf.cdo.server.db.mapping.ITypeMapping;
@@ -46,20 +48,19 @@ import org.eclipse.emf.cdo.server.internal.db.DBStore;
import org.eclipse.emf.cdo.server.internal.db.bundle.OM;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionDelta;
-import org.eclipse.emf.cdo.spi.common.revision.StubCDORevision;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
+import org.eclipse.net4j.db.BatchedStatement;
import org.eclipse.net4j.db.DBException;
import org.eclipse.net4j.db.DBUtil;
+import org.eclipse.net4j.db.IDBConnection;
import org.eclipse.net4j.db.IDBPreparedStatement;
import org.eclipse.net4j.db.IDBPreparedStatement.ReuseProbability;
import org.eclipse.net4j.db.IDBResultSet;
import org.eclipse.net4j.db.ddl.IDBField;
import org.eclipse.net4j.util.ImplementationError;
-import org.eclipse.net4j.util.WrappedException;
import org.eclipse.net4j.util.collection.MoveableList;
import org.eclipse.net4j.util.concurrent.ConcurrencyUtil;
-import org.eclipse.net4j.util.concurrent.TimeoutRuntimeException;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.monitor.OMMonitor.Async;
import org.eclipse.net4j.util.om.trace.ContextTracer;
@@ -67,28 +68,27 @@ import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
+import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
import java.util.Map;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
/**
* @author Eike Stepper
* @since 2.0
*/
public class HorizontalAuditClassMapping extends AbstractHorizontalClassMapping
- implements IClassMappingAuditSupport, IClassMappingDeltaSupport, IClassMappingUnitSupport
+ implements IClassMappingAuditSupport, IClassMappingDeltaSupport, IClassMappingUnitSupport, IClassMappingBulkSupport
{
private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, HorizontalAuditClassMapping.class);
private static final ContextTracer TRACER_UNITS = new ContextTracer(OM.DEBUG_UNITS,
HorizontalAuditClassMapping.class);
+ private static final int BULK_SUPPORT_BATCH_SIZE = 100000;
+
private String sqlInsertAttributes;
private String sqlSelectAttributesCurrent;
@@ -464,60 +464,65 @@ public class HorizontalAuditClassMapping extends AbstractHorizontalClassMapping
try
{
- int column = 1;
- idHandler.setCDOID(stmt, column++, revision.getID());
- stmt.setInt(column++, revision.getVersion());
- stmt.setLong(column++, revision.getTimeStamp());
- stmt.setLong(column++, revision.getRevised());
- idHandler.setCDOID(stmt, column++, revision.getResourceID());
- idHandler.setCDOID(stmt, column++, (CDOID)revision.getContainerID());
- stmt.setInt(column++, revision.getContainingFeatureID());
+ writeValuesToStatement(stmt, idHandler, revision);
+ DBUtil.update(stmt, true);
+ }
+ catch (SQLException e)
+ {
+ throw new DBException(e);
+ }
+ finally
+ {
+ DBUtil.close(stmt);
+ }
+ }
- int isSetCol = column + getValueMappings().size();
+ protected void writeValuesToStatement(PreparedStatement stmt, IIDHandler idHandler, InternalCDORevision revision)
+ throws SQLException
+ {
+ int column = 1;
+ idHandler.setCDOID(stmt, column++, revision.getID());
+ stmt.setInt(column++, revision.getVersion());
+ stmt.setLong(column++, revision.getTimeStamp());
+ stmt.setLong(column++, revision.getRevised());
+ idHandler.setCDOID(stmt, column++, revision.getResourceID());
+ idHandler.setCDOID(stmt, column++, (CDOID)revision.getContainerID());
+ stmt.setInt(column++, revision.getContainingFeatureID());
- for (ITypeMapping mapping : getValueMappings())
+ int isSetCol = column + getValueMappings().size();
+
+ for (ITypeMapping mapping : getValueMappings())
+ {
+ EStructuralFeature feature = mapping.getFeature();
+ if (feature.isUnsettable())
{
- EStructuralFeature feature = mapping.getFeature();
- if (feature.isUnsettable())
+ if (revision.getValue(feature) == null)
{
- if (revision.getValue(feature) == null)
- {
- stmt.setBoolean(isSetCol++, false);
-
- // also set value column to default value
- mapping.setDefaultValue(stmt, column++);
+ stmt.setBoolean(isSetCol++, false);
- continue;
- }
+ // also set value column to default value
+ mapping.setDefaultValue(stmt, column++);
- stmt.setBoolean(isSetCol++, true);
+ continue;
}
- mapping.setValueFromRevision(stmt, column++, revision);
- }
-
- Map<EStructuralFeature, IDBField> listSizeFields = getListSizeFields();
- if (listSizeFields != null)
- {
- // isSetCol now points to the first listTableSize-column
- column = isSetCol;
-
- for (EStructuralFeature feature : listSizeFields.keySet())
- {
- CDOList list = revision.getList(feature);
- stmt.setInt(column++, list.size());
- }
+ stmt.setBoolean(isSetCol++, true);
}
- DBUtil.update(stmt, true);
- }
- catch (SQLException e)
- {
- throw new DBException(e);
+ mapping.setValueFromRevision(stmt, column++, revision);
}
- finally
+
+ Map<EStructuralFeature, IDBField> listSizeFields = getListSizeFields();
+ if (listSizeFields != null)
{
- DBUtil.close(stmt);
+ // isSetCol now points to the first listTableSize-column
+ column = isSetCol;
+
+ for (EStructuralFeature feature : listSizeFields.keySet())
+ {
+ CDOList list = revision.getList(feature);
+ stmt.setInt(column++, list.size());
+ }
}
}
@@ -694,6 +699,9 @@ public class HorizontalAuditClassMapping extends AbstractHorizontalClassMapping
IDBPreparedStatement stmt = null;
int oldFetchSize = -1;
+ AsnychronousListReader listReader = new AsnychronousListReader(accessor, timeStamp, rootID, revisionHandler);
+ ConcurrencyUtil.execute(repository, listReader);
+
final long start1 = TRACER_UNITS.isEnabled() ? System.currentTimeMillis() : CDOBranchPoint.UNSPECIFIED_DATE;
try
@@ -703,9 +711,6 @@ public class HorizontalAuditClassMapping extends AbstractHorizontalClassMapping
stmt.setLong(2, timeStamp);
stmt.setLong(3, timeStamp);
- AsnychronousListFiller listFiller = new AsnychronousListFiller(accessor, timeStamp, rootID, revisionHandler);
- ConcurrencyUtil.execute(repository, listFiller);
-
oldFetchSize = stmt.getFetchSize();
stmt.setFetchSize(100000);
IDBResultSet resultSet = stmt.executeQuery();
@@ -720,17 +725,7 @@ public class HorizontalAuditClassMapping extends AbstractHorizontalClassMapping
break;
}
- listFiller.schedule(revision);
- }
-
- final long start2 = start1 != CDOBranchPoint.UNSPECIFIED_DATE ? System.currentTimeMillis() : start1;
-
- listFiller.await();
-
- if (start1 != CDOBranchPoint.UNSPECIFIED_DATE)
- {
- TRACER_UNITS.format("Read {0} revisions of unit {1}: {2} millis + {3} millis", eClass.getName(), rootID,
- start2 - start1, System.currentTimeMillis() - start2);
+ listReader.schedule(revision);
}
}
finally
@@ -742,165 +737,159 @@ public class HorizontalAuditClassMapping extends AbstractHorizontalClassMapping
DBUtil.close(stmt);
}
+
+ final long start2 = start1 != CDOBranchPoint.UNSPECIFIED_DATE ? System.currentTimeMillis() : start1;
+
+ listReader.await(null);
+
+ if (start1 != CDOBranchPoint.UNSPECIFIED_DATE)
+ {
+ TRACER_UNITS.format("Read {0} revisions of unit {1}: {2} millis + {3} millis", eClass.getName(), rootID,
+ start2 - start1, System.currentTimeMillis() - start2);
+ }
}
- private class AsnychronousListFiller implements Runnable
+ public void writeBulkRevisions(IDBStoreAccessor accessor, List<InternalCDORevision> revisions, CDOBranch branch,
+ long timeStamp, OMMonitor monitor) throws SQLException
{
- private final BlockingQueue<InternalCDORevision> queue = new LinkedBlockingQueue<InternalCDORevision>();
+ IDBStore store = getMappingStrategy().getStore();
+ IRepository repository = store.getRepository();
+ IIDHandler idHandler = store.getIDHandler();
- private final CountDownLatch latch = new CountDownLatch(1);
+ IDBConnection connection = accessor.getDBConnection();
+ BatchedStatement stmt = DBUtil.batched(connection.prepareStatement(sqlInsertAttributes, ReuseProbability.HIGH),
+ BULK_SUPPORT_BATCH_SIZE);
- private final IDBStoreAccessor accessor;
+ AsnychronousListWriter listWriter = new AsnychronousListWriter(accessor);
+ ConcurrencyUtil.execute(repository, listWriter);
- private final long timeStamp;
+ try
+ {
+ for (InternalCDORevision revision : revisions)
+ {
+ int xxx1; // checkDuplicateResources() for resource nodes
+ int xxx2; // reviseOldRevision() for dirty (not new) objects
- private final CDOID rootID;
+ writeValuesToStatement(stmt, idHandler, revision);
+ stmt.executeUpdate(monitor);
- private final DBStore store;
+ listWriter.schedule(revision);
+ }
+ }
+ catch (SQLException e)
+ {
+ throw new DBException(e);
+ }
+ finally
+ {
+ DBUtil.close(stmt, monitor);
+ }
- private final IIDHandler idHandler;
+ listWriter.await(monitor);
+ }
- private final IListMappingUnitSupport[] listMappings;
+ /**
+ * @author Eike Stepper
+ */
+ private class AsnychronousListReader extends AsnychronousListIO<IListMappingUnitSupport>
+ {
+ private final long timeStamp;
- private final ResultSet[] resultSets;
+ private final CDOID rootID;
private final CDORevisionHandler revisionHandler;
- private Throwable exception;
+ private final ResultSet[] resultSets;
- public AsnychronousListFiller(IDBStoreAccessor accessor, long timeStamp, CDOID rootID,
+ public AsnychronousListReader(IDBStoreAccessor accessor, long timeStamp, CDOID rootID,
CDORevisionHandler revisionHandler)
{
- this.accessor = accessor;
+ super(accessor);
this.timeStamp = timeStamp;
this.rootID = rootID;
this.revisionHandler = revisionHandler;
- store = (DBStore)accessor.getStore();
- idHandler = store.getIDHandler();
-
- List<IListMapping> tmp = getListMappings();
- int size = tmp.size();
+ resultSets = new ResultSet[listMappings.length];
+ }
- listMappings = new IListMappingUnitSupport[size];
- resultSets = new ResultSet[size];
+ @Override
+ protected void runWithRevision(InternalCDORevision revision) throws SQLException
+ {
+ super.runWithRevision(revision);
- int i = 0;
- for (IListMapping listMapping : tmp)
+ synchronized (revisionHandler)
{
- listMappings[i++] = (IListMappingUnitSupport)listMapping;
+ revisionHandler.handleRevision(revision);
}
}
- public void schedule(InternalCDORevision revision)
+ @Override
+ protected void runWithList(InternalCDORevision revision, int i, IListMappingUnitSupport listMapping,
+ MoveableList<Object> list) throws SQLException
{
- queue.offer(revision);
+ if (resultSets[i] == null)
+ {
+ resultSets[i] = listMapping.queryUnitEntries(accessor, idHandler, timeStamp, rootID);
+ }
+
+ CDOID id = revision.getID();
+ listMapping.readUnitEntries(resultSets[i], idHandler, id, list);
}
- public void await() throws SQLException
+ @Override
+ protected void closeStatements(OMMonitor monitor) throws SQLException
{
- // Schedule an end marker revision.
- schedule(new StubCDORevision(getEClass()));
-
- try
- {
- latch.await();
- }
- catch (InterruptedException ex)
- {
- throw new TimeoutRuntimeException();
- }
- finally
+ for (ResultSet resultSet : resultSets)
{
- for (ResultSet resultSet : resultSets)
+ if (resultSet != null)
{
- if (resultSet != null)
- {
- Statement statement = resultSet.getStatement();
- DBUtil.close(statement);
- }
+ Statement statement = resultSet.getStatement();
+ DBUtil.close(statement);
}
}
+ }
+ }
- if (exception instanceof RuntimeException)
- {
- throw (RuntimeException)exception;
- }
+ /**
+ * @author Eike Stepper
+ */
+ private class AsnychronousListWriter extends AsnychronousListIO<IListMappingBulkSupport>
+ {
+ private final BatchedStatement[] statements;
- if (exception instanceof Error)
- {
- throw (Error)exception;
- }
+ public AsnychronousListWriter(IDBStoreAccessor accessor)
+ {
+ super(accessor);
+ statements = new BatchedStatement[listMappings.length];
+ }
- if (exception instanceof SQLException)
+ @Override
+ protected void runWithList(InternalCDORevision revision, int i, IListMappingBulkSupport listMapping,
+ MoveableList<Object> list) throws SQLException
+ {
+ if (statements[i] == null)
{
- throw (SQLException)exception;
+ statements[i] = DBUtil.batched(listMapping.getInsertEntryStatement(accessor), BULK_SUPPORT_BATCH_SIZE);
}
- if (exception instanceof Exception)
- {
- throw WrappedException.wrap((Exception)exception);
- }
+ listMapping.writeBulkValues(statements[i], idHandler, revision, list);
}
- public void run()
+ @Override
+ protected void closeStatements(OMMonitor monitor) throws SQLException
{
- StoreThreadLocal.setAccessor(accessor);
+ monitor.begin(statements.length);
try
{
- while (store.isActive())
+ for (PreparedStatement statement : statements)
{
- InternalCDORevision revision = queue.poll(1, TimeUnit.SECONDS);
- if (revision == null)
- {
- continue;
- }
-
- if (revision instanceof StubCDORevision)
- {
- return;
- }
-
- readUnitEntries(revision);
+ DBUtil.close(statement, monitor.fork());
}
}
- catch (Throwable ex)
- {
- exception = ex;
- }
finally
{
- latch.countDown();
- StoreThreadLocal.remove();
- }
- }
-
- private void readUnitEntries(InternalCDORevision revision) throws SQLException
- {
- CDOID id = revision.getID();
-
- for (int i = 0; i < listMappings.length; i++)
- {
- IListMappingUnitSupport listMapping = listMappings[i];
- EStructuralFeature feature = listMapping.getFeature();
-
- MoveableList<Object> list = revision.getList(feature);
- int size = list.size();
- if (size != 0)
- {
- if (resultSets[i] == null)
- {
- resultSets[i] = listMapping.queryUnitEntries(accessor, idHandler, timeStamp, rootID);
- }
-
- listMapping.readUnitEntries(resultSets[i], idHandler, id, list);
- }
- }
-
- synchronized (revisionHandler)
- {
- revisionHandler.handleRevision(revision);
+ monitor.done();
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditMappingStrategyWithRanges.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditMappingStrategyWithRanges.java
index 8664798381..a6a578df0e 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditMappingStrategyWithRanges.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalAuditMappingStrategyWithRanges.java
@@ -12,7 +12,6 @@
*/
package org.eclipse.emf.cdo.server.internal.db.mapping.horizontal;
-import org.eclipse.emf.cdo.server.db.mapping.IClassMapping;
import org.eclipse.emf.cdo.server.db.mapping.IListMapping;
import org.eclipse.emf.ecore.EClass;
@@ -35,9 +34,9 @@ public class HorizontalAuditMappingStrategyWithRanges extends HorizontalAuditMap
}
@Override
- protected IClassMapping doCreateClassMapping(EClass eClass)
+ public boolean hasBulkSupport()
{
- return new HorizontalAuditClassMapping(this, eClass);
+ return true;
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingMappingStrategyWithRanges.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingMappingStrategyWithRanges.java
index dcd53673b1..e44ac55c73 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingMappingStrategyWithRanges.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingMappingStrategyWithRanges.java
@@ -18,7 +18,6 @@ import org.eclipse.emf.cdo.common.protocol.CDODataInput;
import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
import org.eclipse.emf.cdo.server.db.CDODBUtil;
import org.eclipse.emf.cdo.server.db.IIDHandler;
-import org.eclipse.emf.cdo.server.db.mapping.IClassMapping;
import org.eclipse.emf.cdo.server.db.mapping.IListMapping;
import org.eclipse.net4j.db.DBException;
@@ -66,12 +65,6 @@ public class HorizontalBranchingMappingStrategyWithRanges extends HorizontalBran
}
@Override
- protected IClassMapping doCreateClassMapping(EClass eClass)
- {
- return new HorizontalBranchingClassMapping(this, eClass);
- }
-
- @Override
public IListMapping doCreateListMapping(EClass containingClass, EStructuralFeature feature)
{
return new BranchingListTableMappingWithRanges(this, containingClass, feature);
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalMappingStrategy.java
index 3e601ae5e5..cd1fdcfa9a 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalMappingStrategy.java
@@ -25,9 +25,11 @@ import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
import org.eclipse.emf.cdo.server.db.mapping.IClassMapping;
import org.eclipse.emf.cdo.server.db.mapping.IListMapping;
import org.eclipse.emf.cdo.server.db.mapping.IMappingStrategy;
+import org.eclipse.emf.cdo.server.db.mapping.IMappingStrategyBulkSupport;
import org.eclipse.emf.cdo.server.db.mapping.ITypeMapping;
import org.eclipse.emf.cdo.spi.common.commit.CDOChangeSetSegment;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.net4j.db.IDBAdapter;
import org.eclipse.net4j.util.collection.CloseableIterator;
@@ -42,13 +44,14 @@ import org.eclipse.emf.ecore.EStructuralFeature;
import java.io.IOException;
import java.sql.Connection;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* @author Eike Stepper
*/
-public class HorizontalMappingStrategy extends Lifecycle implements IMappingStrategy
+public class HorizontalMappingStrategy extends Lifecycle implements IMappingStrategyBulkSupport
{
private Map<String, String> properties;
@@ -232,6 +235,31 @@ public class HorizontalMappingStrategy extends Lifecycle implements IMappingStra
return delegate.getListJoin(attrTable, listTable);
}
+ public boolean hasBulkSupport()
+ {
+ if (delegate instanceof IMappingStrategyBulkSupport)
+ {
+ IMappingStrategyBulkSupport bulkSupport = (IMappingStrategyBulkSupport)delegate;
+ return bulkSupport.hasBulkSupport();
+ }
+
+ return false;
+ }
+
+ public void writeBulkRevisions(IDBStoreAccessor accessor, Map<EClass, List<InternalCDORevision>> revisionsPerClass,
+ Map<CDOID, EClass> newObjectTypes, CDOBranch branch, long timeStamp, OMMonitor monitor)
+ {
+ if (delegate instanceof IMappingStrategyBulkSupport)
+ {
+ IMappingStrategyBulkSupport bulkSupport = (IMappingStrategyBulkSupport)delegate;
+ bulkSupport.writeBulkRevisions(accessor, revisionsPerClass, newObjectTypes, branch, timeStamp, monitor);
+ }
+ else
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
+
@Override
protected void doActivate() throws Exception
{
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/ObjectTypeTable.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/ObjectTypeTable.java
index d25b197739..51baf83674 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/ObjectTypeTable.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/ObjectTypeTable.java
@@ -21,6 +21,7 @@ import org.eclipse.emf.cdo.server.db.IDBStore;
import org.eclipse.emf.cdo.server.db.IDBStoreAccessor;
import org.eclipse.emf.cdo.server.db.IIDHandler;
import org.eclipse.emf.cdo.server.internal.db.CDODBSchema;
+import org.eclipse.emf.cdo.server.internal.db.IObjectTypeMapperBulkSupport;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.net4j.db.DBException;
@@ -42,13 +43,20 @@ import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
/**
* @author Eike Stepper
* @since 4.0
*/
-public class ObjectTypeTable extends AbstractObjectTypeMapper implements IMappingConstants
+public class ObjectTypeTable extends AbstractObjectTypeMapper implements IMappingConstants, IObjectTypeMapperBulkSupport
{
+ private static final int BATCH_SIZE = 300000;
+
private IDBTable table;
private String sqlDelete;
@@ -61,6 +69,11 @@ public class ObjectTypeTable extends AbstractObjectTypeMapper implements IMappin
{
}
+ public final boolean hasBulkSupport()
+ {
+ return false;
+ }
+
public final CDOClassifierRef getObjectType(IDBStoreAccessor accessor, CDOID id)
{
IIDHandler idHandler = getMappingStrategy().getStore().getIDHandler();
@@ -142,6 +155,75 @@ public class ObjectTypeTable extends AbstractObjectTypeMapper implements IMappin
}
}
+ public final Set<CDOID> putObjectTypes(IDBStoreAccessor accessor, Map<CDOID, EClass> newObjectTypes, long timeStamp,
+ OMMonitor monitor)
+ {
+ IDBStore store = getMappingStrategy().getStore();
+ IIDHandler idHandler = store.getIDHandler();
+ IDBPreparedStatement stmt = accessor.getDBConnection().prepareStatement(sqlInsert, ReuseProbability.MAX);
+
+ Set<CDOID> duplicateIDs = null;
+ List<CDOID> batchIDs = new ArrayList<CDOID>();
+ int batchCount = 0;
+
+ try
+ {
+ for (Entry<CDOID, EClass> entry : newObjectTypes.entrySet())
+ {
+ CDOID id = entry.getKey();
+ EClass type = entry.getValue();
+
+ batchIDs.add(id);
+
+ idHandler.setCDOID(stmt, 1, id);
+ idHandler.setCDOID(stmt, 2, getMetaDataManager().getMetaID(type, timeStamp));
+ stmt.setLong(3, timeStamp);
+ stmt.addBatch();
+
+ batchCount = executeBatch(stmt, batchIDs, batchCount);
+ }
+
+ executeBatch(stmt, batchIDs, batchCount);
+ return duplicateIDs;
+ }
+ catch (SQLException ex)
+ {
+ int xxx;
+
+ if (store.getDBAdapter().isDuplicateKeyException(ex))
+ {
+ // Unique key violation can occur in rare cases (merging new objects from other branches)
+ return duplicateIDs;
+ }
+
+ throw new DBException(ex);
+ }
+ finally
+ {
+ DBUtil.close(stmt);
+ }
+ }
+
+ private int executeBatch(IDBPreparedStatement stmt, List<CDOID> batchIDs, int batchCount) throws SQLException
+ {
+ if (++batchCount > BATCH_SIZE)
+ {
+ int[] results = stmt.executeBatch();
+ for (int i = 0; i < results.length; i++)
+ {
+ int result = results[i];
+ if (result != 1)
+ {
+ throw new DBException("Object type could not be inserted: " + batchIDs.get(i)); //$NON-NLS-1$
+ }
+ }
+
+ batchCount = 0;
+ }
+
+ return batchCount;
+ }
+
public final boolean removeObjectType(IDBStoreAccessor accessor, CDOID id)
{
IIDHandler idHandler = getMappingStrategy().getStore().getIDHandler();
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 b929622f43..d8e6b5ae28 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
@@ -57,26 +57,21 @@ public abstract class StoreAccessor extends StoreAccessorBase
@Override
protected void doWrite(InternalCommitContext context, OMMonitor monitor)
{
+ Store store = getStore();
CDOBranch branch = context.getBranchPoint().getBranch();
long timeStamp = context.getBranchPoint().getTimeStamp();
long previousTimeStamp = context.getPreviousTimeStamp();
String userID = context.getUserID();
String commitComment = context.getCommitComment();
- Store store = getStore();
- boolean deltas = store.getSupportedChangeFormats().contains(IStore.ChangeFormat.DELTA);
-
InternalCDOPackageUnit[] newPackageUnits = context.getNewPackageUnits();
- InternalCDORevision[] newObjects = context.getNewObjects();
CDOID[] detachedObjects = context.getDetachedObjects();
- InternalCDORevisionDelta[] dirtyObjectDeltas = context.getDirtyObjectDeltas();
- InternalCDORevision[] dirtyObjects = context.getDirtyObjects();
- int dirtyCount = deltas ? dirtyObjectDeltas.length : dirtyObjects.length;
+
+ monitor.begin(1 + newPackageUnits.length + 2 + context.getNewObjects().length + detachedObjects.length
+ + context.getDirtyObjectDeltas().length + 1);
try
{
- monitor.begin(1 + newPackageUnits.length + 2 + newObjects.length + detachedObjects.length + dirtyCount + 1);
-
writeCommitInfo(branch, timeStamp, previousTimeStamp, userID, commitComment, monitor.fork());
writePackageUnits(newPackageUnits, monitor.fork(newPackageUnits.length));
@@ -93,22 +88,8 @@ public abstract class StoreAccessor extends StoreAccessorBase
detachObjects(detachedObjects, branch, timeStamp, monitor.fork(detachedObjects.length));
}
- if (newObjects.length != 0)
- {
- writeNewObjectRevisions(context, newObjects, branch, monitor.fork(newObjects.length));
- }
-
- if (dirtyCount != 0)
- {
- if (deltas)
- {
- writeRevisionDeltas(dirtyObjectDeltas, branch, timeStamp, monitor.fork(dirtyCount));
- }
- else
- {
- writeDirtyObjectRevisions(context, dirtyObjects, branch, monitor.fork(dirtyCount));
- }
- }
+ boolean deltas = store.getSupportedChangeFormats().contains(IStore.ChangeFormat.DELTA);
+ writeNewAndDirtyRevisions(context, deltas, branch, timeStamp, monitor);
ExtendedDataInputStream in = context.getLobs();
if (in != null)
@@ -185,6 +166,36 @@ public abstract class StoreAccessor extends StoreAccessorBase
}
/**
+ * @since 4.5
+ */
+ protected void writeNewAndDirtyRevisions(InternalCommitContext context, boolean deltas, CDOBranch branch,
+ long timeStamp, OMMonitor monitor)
+ {
+ InternalCDORevision[] newObjects = context.getNewObjects();
+ if (newObjects.length != 0)
+ {
+ writeNewObjectRevisions(context, newObjects, branch, monitor.fork(newObjects.length));
+ }
+
+ if (deltas)
+ {
+ InternalCDORevisionDelta[] dirtyObjectDeltas = context.getDirtyObjectDeltas();
+ if (dirtyObjectDeltas.length != 0)
+ {
+ writeRevisionDeltas(dirtyObjectDeltas, branch, timeStamp, monitor.fork(dirtyObjectDeltas.length));
+ }
+ }
+ else
+ {
+ InternalCDORevision[] dirtyObjects = context.getDirtyObjects();
+ if (dirtyObjects.length != 0)
+ {
+ writeDirtyObjectRevisions(context, dirtyObjects, branch, monitor.fork(dirtyObjects.length));
+ }
+ }
+ }
+
+ /**
* @since 3.0
*/
protected abstract void writeRevisions(InternalCDORevision[] revisions, CDOBranch branch, OMMonitor monitor);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/extra/UnitManagerMain.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/extra/UnitManagerMain.java
index f46bd27c8b..6badc33ea8 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/extra/UnitManagerMain.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/extra/UnitManagerMain.java
@@ -37,6 +37,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
import java.util.Iterator;
/**
@@ -73,7 +75,7 @@ public class UnitManagerMain
stop();
start("Commit " + i);
- transaction.commit();
+ transaction.commit(new NullProgressMonitor());
stop();
}
}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/BatchedStatement.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/BatchedStatement.java
index 624d6e6a09..613152bd3f 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/BatchedStatement.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/BatchedStatement.java
@@ -10,7 +10,10 @@
*/
package org.eclipse.net4j.db;
+import org.eclipse.net4j.util.om.monitor.OMMonitor;
+
import java.sql.PreparedStatement;
+import java.sql.SQLException;
/**
* @since 4.5
@@ -25,4 +28,8 @@ public interface BatchedStatement extends PreparedStatement
public int getBatchCount();
public int getTotalResult();
+
+ public int executeUpdate(OMMonitor monitor) throws SQLException;
+
+ public void close(OMMonitor monitor) throws SQLException;
}
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
index c6667dacdd..971d9037de 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
@@ -421,13 +421,24 @@ public final class DBUtil
return null;
}
- public static Exception close(Statement statement)
+ /**
+ * @since 4.5
+ */
+ public static Exception close(Statement statement, OMMonitor monitor)
{
if (statement != null)
{
try
{
- statement.close();
+ if (monitor != null && statement instanceof BatchedStatement)
+ {
+ BatchedStatement batchedStatement = (BatchedStatement)statement;
+ batchedStatement.close(monitor);
+ }
+ else
+ {
+ statement.close();
+ }
}
catch (Exception ex)
{
@@ -444,6 +455,11 @@ public final class DBUtil
return null;
}
+ public static Exception close(Statement statement)
+ {
+ return close(statement, null);
+ }
+
public static Exception close(Connection connection)
{
if (connection != null)
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/BatchedStatementImpl.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/BatchedStatementImpl.java
index c022c64634..375a2cf3e5 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/BatchedStatementImpl.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/internal/db/BatchedStatementImpl.java
@@ -13,6 +13,8 @@ package org.eclipse.net4j.internal.db;
import org.eclipse.net4j.db.BatchedStatement;
import org.eclipse.net4j.db.DBException;
import org.eclipse.net4j.db.jdbc.DelegatingPreparedStatement;
+import org.eclipse.net4j.util.om.monitor.OMMonitor;
+import org.eclipse.net4j.util.om.monitor.OMMonitor.Async;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -56,12 +58,17 @@ public final class BatchedStatementImpl extends DelegatingPreparedStatement impl
@Override
public int executeUpdate() throws SQLException
{
+ return executeUpdate((OMMonitor)null);
+ }
+
+ public int executeUpdate(OMMonitor monitor) throws SQLException
+ {
PreparedStatement delegate = getDelegate();
delegate.addBatch();
if (++batchCount >= batchSize)
{
- return doExecuteBatch();
+ return doExecuteBatch(monitor);
}
return 0;
@@ -70,9 +77,14 @@ public final class BatchedStatementImpl extends DelegatingPreparedStatement impl
@Override
public void close() throws SQLException
{
+ close(null);
+ }
+
+ public void close(OMMonitor monitor) throws SQLException
+ {
if (batchCount != 0)
{
- doExecuteBatch();
+ doExecuteBatch(monitor);
}
super.close();
@@ -97,27 +109,39 @@ public final class BatchedStatementImpl extends DelegatingPreparedStatement impl
throw new UnsupportedOperationException("Only updates are supported");
}
- private int doExecuteBatch() throws SQLException
+ private int doExecuteBatch(OMMonitor monitor) throws SQLException
{
- int sum = 0;
+ Async async = monitor != null ? monitor.forkAsync() : null;
- int[] results = getDelegate().executeBatch();
- for (int i = 0; i < results.length; i++)
+ try
{
- int result = results[i];
- if (result != Statement.SUCCESS_NO_INFO)
+ int sum = 0;
+
+ int[] results = getDelegate().executeBatch();
+ for (int i = 0; i < results.length; i++)
{
- if (result < 0)
+ int result = results[i];
+ if (result != Statement.SUCCESS_NO_INFO)
{
- throw new DBException("Result " + i + " is not successful: " + result);
+ if (result < 0)
+ {
+ throw new DBException("Result " + i + " is not successful: " + result);
+ }
+
+ sum += result;
}
+ }
- sum += result;
+ totalResult += sum;
+ return sum;
+ }
+ finally
+ {
+ if (async != null)
+ {
+ async.stop();
}
}
-
- totalResult += sum;
- return sum;
}
private static Connection getConnection(PreparedStatement delegate) throws DBException
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RunnableWithName.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RunnableWithName.java
index ef72c20d90..d4a5d6caa6 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RunnableWithName.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RunnableWithName.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.util.concurrent;
import org.eclipse.net4j.util.StringUtil;
+import org.eclipse.net4j.util.om.OMPlatform;
/**
* @author Eike Stepper
@@ -18,41 +19,69 @@ import org.eclipse.net4j.util.StringUtil;
*/
public abstract class RunnableWithName implements Runnable
{
+ public static final boolean THREAD_NAMES = Boolean
+ .parseBoolean(OMPlatform.INSTANCE.getProperty("org.eclipse.net4j.util.thread.names", "false"));
+
public abstract String getName();
public final void run()
{
- Thread thread = null;
- String oldName = null;
+ if (!THREAD_NAMES)
+ {
+ doRun();
+ return;
+ }
String name = getName();
- if (!StringUtil.isEmpty(name))
+ if (StringUtil.isEmpty(name))
{
- thread = Thread.currentThread();
- oldName = thread.getName();
- if (name.equals(oldName))
- {
- thread = null;
- oldName = null;
- }
- else
- {
- thread.setName(name);
- }
+ doRun();
+ return;
}
+ Thread thread = Thread.currentThread();
+ String oldName = thread.getName();
+
+ if (!StringUtil.isEmpty(oldName))
+ {
+ name = oldName + " - " + name;
+ }
+
+ thread.setName(name);
+
try
{
doRun();
}
finally
{
- if (thread != null)
- {
- thread.setName(oldName);
- }
+ thread.setName(oldName);
}
}
protected abstract void doRun();
+
+ public static void runWithName(final String name, final Runnable runnable)
+ {
+ if (!THREAD_NAMES || StringUtil.isEmpty(name))
+ {
+ runnable.run();
+ return;
+ }
+
+ new RunnableWithName()
+ {
+ @Override
+ public String getName()
+ {
+ return name;
+ }
+
+ @Override
+ protected void doRun()
+ {
+ runnable.run();
+ }
+ }.run();
+ }
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/TimeoutMonitor.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/TimeoutMonitor.java
index c04a3ad248..22d484b824 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/TimeoutMonitor.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/TimeoutMonitor.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.net4j.util.om.monitor;
-import org.eclipse.net4j.util.concurrent.TimeoutRuntimeException;
import org.eclipse.net4j.util.concurrent.Timeouter;
/**
@@ -118,7 +117,8 @@ public class TimeoutMonitor extends Monitor
protected void handleTimeout(long untouched)
{
- cancel(new TimeoutRuntimeException("Timeout after " + untouched + " millis"));
+ int xxx;
+ // cancel(new TimeoutRuntimeException("Timeout after " + untouched + " millis"));
}
private void cancelTimeouter()
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithMonitoring.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithMonitoring.java
index c8c4930e10..3ab282de65 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithMonitoring.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithMonitoring.java
@@ -21,6 +21,8 @@ import org.eclipse.net4j.util.om.monitor.TimeoutMonitor;
import org.eclipse.internal.net4j.bundle.OM;
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
import java.util.TimerTask;
import java.util.concurrent.ExecutorService;
@@ -168,6 +170,9 @@ public abstract class IndicationWithMonitoring extends IndicationWithResponse
double totalWork = getTotalWork();
double work = getWork();
+ int xxx;
+ System.out.println(++count + ": " + formatter.format(work) + " / " + formatter.format(totalWork));
+
new MonitorProgressRequest(protocol, correlationID, totalWork, work).sendAsync();
}
catch (Exception ex)
@@ -179,5 +184,9 @@ public abstract class IndicationWithMonitoring extends IndicationWithResponse
}
}
}
+
+ private int count;
}
+
+ private static NumberFormat formatter = new DecimalFormat("#0.00");
}
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
index d1b1c8c2da..52972750f2 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/Signal.java
@@ -13,6 +13,8 @@ package org.eclipse.net4j.signal;
import org.eclipse.net4j.buffer.BufferInputStream;
import org.eclipse.net4j.buffer.BufferOutputStream;
import org.eclipse.net4j.util.ReflectUtil;
+import org.eclipse.net4j.util.StringUtil;
+import org.eclipse.net4j.util.concurrent.RunnableWithName;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import org.eclipse.net4j.util.io.IOTimeoutException;
@@ -270,6 +272,18 @@ public abstract class Signal implements Runnable
{
Exception exception = null;
+ String name = null;
+ String oldName = null;
+ Thread thread = null;
+
+ if (RunnableWithName.THREAD_NAMES)
+ {
+ thread = Thread.currentThread();
+ oldName = thread.getName();
+ name = StringUtil.isEmpty(oldName) ? toString() : oldName + " - " + toString();
+ thread.setName(name);
+ }
+
try
{
execute(bufferInputStream, bufferOutputStream);
@@ -286,6 +300,11 @@ public abstract class Signal implements Runnable
}
finally
{
+ if (thread != null)
+ {
+ thread.setName(oldName);
+ }
+
if (closeInputStreamAfterMe())
{
IOUtil.closeSilent(wrappedInputStream != null ? wrappedInputStream : bufferInputStream);

Back to the top