Skip to content

Commit

Permalink
Merge pull request #138 from gs-rezaem/master
Browse files Browse the repository at this point in the history
EC integration
  • Loading branch information
gs-rezaem authored Mar 2, 2018
2 parents a90efcf + 0387ed2 commit 9d8bff8
Show file tree
Hide file tree
Showing 443 changed files with 6,590 additions and 2,054 deletions.
19 changes: 16 additions & 3 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@
specific language governing permissions and limitations
under the License.
-->
<!--Portions copyright Hiroshi Ito. Licensed under Apache 2.0 license-->

<project name="reladomo" default="all" xmlns:jacoco="antlib:org.jacoco.ant">
<property environment="env"/>
<property name="jdk.home" value="${env.JDK_HOME}"/>
<property name="root" value="${env.RELADOMO_HOME}"/>
<!--todo: remove-->
<property name="mithra.home" value="${env.RELADOMO_HOME}/reladomo"/>
<property name="mithra.generateGscListMethod" value="true"/>
<property name="mithra.generateGscListMethod" value="false"/>
<property name="mithra.generateEcListMethod" value="true"/>

<property name="gs-collections.version" value="5.0.0"/>
<property name="eclipse-collections.version" value="7.1.1"/>
<property name="junit.version" value="4.11"/>
<property name="slf4j.version" value="1.6.4"/>
<property name="jtdsjbcp.version" value="1.2.0.15"/>
Expand Down Expand Up @@ -651,12 +654,14 @@
generatedDir="${root}/reladomo/target/test-generated-onheap-src"
nonGeneratedDir="${root}/reladomo/src/test/java"
generateGscListMethod="${mithra.generateGscListMethod}"
generateEcListMethod="${mithra.generateEcListMethod}"
generateConcreteClasses="${reladomo.generateConcreteClasses}">
</reladomo-gen>
<reladomo-gen xml="${root}/reladomo/src/test/reladomo-xml/MithraClassList.xml"
generatedDir="${root}/reladomo/target/test-generated-onheap-src"
nonGeneratedDir="${root}/reladomo/src/test/java"
generateGscListMethod="${mithra.generateGscListMethod}"
generateEcListMethod="${mithra.generateEcListMethod}"
generateConcreteClasses="${reladomo.generateConcreteClasses}">
<mithraImport dir="${root}/reladomo/src/test/reladomo-xml/" fileName="MithraClassListToImport.xml"/>
<mithraImport dir="${root}/reladomo/src/test/reladomo-xml/testmithraimport" fileName="MithraTestImportClassList.xml"/>
Expand All @@ -673,13 +678,15 @@
generatedDir="${root}/reladomo/target/test-generated-offheap-src"
nonGeneratedDir="${root}/reladomo/src/test/java"
generateGscListMethod="${mithra.generateGscListMethod}"
generateEcListMethod="${mithra.generateEcListMethod}"
generateConcreteClasses="${reladomo.generateConcreteClasses}">
</reladomo-gen>
<reladomo-gen xml="${root}/reladomo/src/test/reladomo-xml/MithraClassList.xml"
forceOffHeap="true"
generatedDir="${root}/reladomo/target/test-generated-offheap-src"
nonGeneratedDir="${root}/reladomo/src/test/java"
generateGscListMethod="${mithra.generateGscListMethod}"
generateEcListMethod="${mithra.generateEcListMethod}"
generateConcreteClasses="${reladomo.generateConcreteClasses}">
<mithraImport dir="${root}/reladomo/src/test/reladomo-xml/" fileName="MithraClassListToImport.xml"/>
<mithraImport dir="${root}/reladomo/src/test/reladomo-xml/testmithraimport" fileName="MithraTestImportClassList.xml"/>
Expand Down Expand Up @@ -714,6 +721,7 @@
generatedDir="${root}/reladomo/target/test-generated-onheap-src"
nonGeneratedDir="${root}/reladomo/src/test/java"
generateGscListMethod="${mithra.generateGscListMethod}"
generateEcListMethod="${mithra.generateEcListMethod}"
generateConcreteClasses="${reladomo.generateConcreteClasses}"
defaultFinalGetters="true">
</reladomo-gen>
Expand All @@ -722,6 +730,7 @@
generatedDir="${root}/reladomo/target/test-generated-offheap-src"
nonGeneratedDir="${root}/reladomo/src/test/java"
generateGscListMethod="${mithra.generateGscListMethod}"
generateEcListMethod="${mithra.generateEcListMethod}"
generateConcreteClasses="${reladomo.generateConcreteClasses}"
defaultFinalGetters="true">
</reladomo-gen>
Expand Down Expand Up @@ -1849,7 +1858,6 @@
</classpath>
<jvmarg value="-server"/>
<jvmarg value="${jacocovmarg}${root}/reladomo/target/coverage/@{mithraxmlconfig}@{testclass}@{heap}.exec"/>
<jvmarg value="-XX:MaxPermSize=320m"/>
<jvmarg value="-Xmx3048m"/>
<jvmarg value="-ea"/>
<jvmarg value="-Dlog4j.configuration=file:${root}/reladomo/src/test/resources/log4jWarn.config"/>
Expand All @@ -1872,7 +1880,12 @@
</macrodef>

<target name="jdk18-sanity-check">
<available property="reladomo.jdk18.sanity.check" file="${env.RELADOMO_JDK_18_HOME}/bin/java"/>
<condition property="reladomo.jdk18.sanity.check">
<or>
<available property="" file="${env.RELADOMO_JDK_18_HOME}/bin/java"/>
<available property="" file="${env.RELADOMO_JDK_18_HOME}/bin/java.exe"/>
</or>
</condition>
<fail message="Could not find JDK 1.8 for running serial tests in ${env.RELADOMO_JDK_18_HOME}/bin/java. Set the RELADOMO_JDK_18_HOME environment variable!"
unless="reladomo.jdk18.sanity.check"/>
</target>
Expand Down
49 changes: 0 additions & 49 deletions build/pom-templates/pom-mithragendb.xml

This file was deleted.

75 changes: 0 additions & 75 deletions build/pom-templates/pom-mithragenxml.xml

This file was deleted.

75 changes: 0 additions & 75 deletions build/pom-templates/pom-mithratestresource.xml

This file was deleted.

13 changes: 13 additions & 0 deletions build/pom-templates/pom-reladomo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
specific language governing permissions and limitations
under the License.
-->
<!-- Portions copyright Hiroshi Ito. Licensed under Apache 2.0 license -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
Expand Down Expand Up @@ -64,6 +65,18 @@
<version>5.1.0</version>
</dependency>

<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-api</artifactId>
<version>7.1.1</version>
</dependency>

<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections</artifactId>
<version>7.1.1</version>
</dependency>

<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
Expand Down
5 changes: 4 additions & 1 deletion build/reladomolib.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# <repo>, <groupId>, <artifactId>, <version>, <extension>, <destDir>, <checksum>
# central,org.apache.ant,ant,1.9.6,jar,build/lib,80E2063B01BAB3C79C2D84E4ED5E73868394C85A
central,com.goldmansachs,gs-collections-api,5.1.0,jar,lib/compile,EA605CDF64CAB5FC7B48C99F061D4C8DB05B6FF1
central,com.goldmansachs,gs-collections,5.1.0,jar,lib/compile,07114C5349C816EA645B1EA3FFCC21FA073CBABC
central,org.eclipse.collections,eclipse-collections-api,7.1.1,jar,lib/compile,806C2B3BEF5364D1A1668F25CE70100FA2C6B919
central,org.eclipse.collections,eclipse-collections,7.1.1,jar,lib/compile,83ECA9F03F1F2D055DF453D72036C5CE2E82896B
central,joda-time,joda-time,2.9.4,jar,lib/compile,1C295B462F16702EBE720BBB08F62E1BA80DA41B
central,org.apache.geronimo.specs,geronimo-jta_1.1_spec,1.1.1,jar,lib/compile,AABAB3165B8EA936B9360ABBF448459C0D04A5A4
central,org.slf4j,slf4j-api,1.7.21,jar,lib/compile,139535A69A4239DB087DE9BAB0BEE568BF8E0B70
Expand Down Expand Up @@ -84,3 +85,5 @@ central,org.apache.geronimo.specs,geronimo-jms_1.1_spec,1.1.1,jar,lib/xa,C872B46
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Portions copyright Hiroshi Ito. Licensed under Apache 2.0 license
9 changes: 9 additions & 0 deletions dco/hiroshi_ito.dco
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
1) I, Hiroshi Ito, certify that all work committed with the commit message
"covered by: hiroshi_ito.dco" is my original work and I own the copyright
to this work. I agree to contribute this code under the Apache 2.0 license.

2) I understand and agree all contribution including all personal
information I submit with it is maintained indefinitely and may be
redistributed consistent with the open source license(s) involved.

This certification is effective for all code contributed from 2018-02-13 to 9999-01-01.
47 changes: 47 additions & 0 deletions reladomo/src/doc/GSC_TO_EC_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# User Guide to migrate from GS Collections to Eclipse Collections

Starting with version 17.0.0, `Reladomo` supports [Eclipse Collections](https://github.com/eclipse/eclipse-collections).
GS Collections support is now deprecated. Please note that GS Collections support is planned to
be removed in 1 year (Mar 2019). We recommend users to be prepared for the deprecation and start a plan to migrate from
GS Collections to Eclipse Collections.

Here is a quick guide to migrate from GS Collections to Eclipse Collections

### General Migration Guide
1. In `reladomo-gen` task in your build configuration (Ant, Maven or Gradle), replace `generateGscListMethod` with `generateEcListMethod`

**Ant example:**
```
<reladomo-gen xml="PATH_TO_THE_XML"
generatedDir="PATH_TO_THE_GEN_DIR"
nonGeneratedDir="PATH_TO_THE_NON_GEN_DIR"
generateGscListMethod="true" />
```
```
<reladomo-gen xml="PATH_TO_THE_XML"
generatedDir="PATH_TO_THE_GEN_DIR"
nonGeneratedDir="PATH_TO_THE_NON_GEN_DIR"
generateEcListMethod="true" />
```

2. Replace `asGscList()` with `asEcList()` in your code.
3. Replace `com.gs.collections.*` imports with `org.eclipse.collections.*` in your code

### Breaking Changes in 17.0.0
As part of version `17.0.0`, we made breaking changes in several minor public APIs in Reladomo. If you use any of
these APIs in conjunction with GS Collections APIs, you may need to replace GS Collections dependency with Eclipse Collections equivalent.

##### Classes
- `MithraFastList`
- `AdhocFastList`
- `ByteArraySet`
- `ConstantIntSet`
- `ConstantShortSet`

##### Methods
- `AbstractDatedCache.MatchAllAsOfDatesProcedureForMany#getResult()`
- `MasterSyncResult#getBuffers()`
- `MithraCompositeList#getLists()`
- `AsOfEqualityChecker#getMsiPool()`
- `ConcurrentIntObjectHashMap#parallelForEachValue()`
- All methods in `ListFactory`
Loading

0 comments on commit 9d8bff8

Please sign in to comment.