Skip to content

Commit

Permalink
MODULE: Stupid simple module.
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-at-work authored and albertogpz committed Feb 4, 2022
1 parent 477a823 commit 0be467b
Show file tree
Hide file tree
Showing 19 changed files with 127 additions and 4 deletions.
6 changes: 6 additions & 0 deletions boms/geode-all-bom/src/test/resources/expected-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,12 @@
<version>${version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.geode</groupId>
<artifactId>geode-wan-txgrouping</artifactId>
<version>${version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.geode</groupId>
<artifactId>geode-web</artifactId>
Expand Down
35 changes: 35 additions & 0 deletions geode-wan-txgrouping/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish-java.gradle"


dependencies {
// main
api(platform(project(':boms:geode-all-bom')))
compileOnly(platform(project(':boms:geode-all-bom')))

compileOnly('org.jetbrains:annotations')

implementation(project(':geode-wan'))
implementation(project(':geode-logging'))
implementation(project(':geode-serialization'))
implementation(project(':geode-core'))

}
70 changes: 70 additions & 0 deletions geode-wan-txgrouping/src/test/resources/expected-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.geode</groupId>
<artifactId>geode-wan-txgrouping</artifactId>
<version>${version}</version>
<name>Apache Geode</name>
<description>Apache Geode provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing</description>
<url>http://geode.apache.org</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com:apache/geode.git</connection>
<developerConnection>scm:git:https://github.com:apache/geode.git</developerConnection>
<url>https://github.com/apache/geode</url>
</scm>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.geode</groupId>
<artifactId>geode-all-bom</artifactId>
<version>${version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.geode</groupId>
<artifactId>geode-wan</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.geode</groupId>
<artifactId>geode-logging</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.geode</groupId>
<artifactId>geode-serialization</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.geode</groupId>
<artifactId>geode-core</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
3 changes: 3 additions & 0 deletions geode-wan/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ dependencies {
testImplementation('junit:junit')
testImplementation('org.mockito:mockito-core')

// TODO jbarrett remove
testRuntimeOnly(project(':geode-wan-txgrouping'))

integrationTestImplementation(project(':geode-junit'))
integrationTestImplementation('org.assertj:assertj-core')
integrationTestImplementation('junit:junit')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import org.apache.geode.cache.wan.GatewayTransportFilter;
import org.apache.geode.cache.wan.internal.parallel.ParallelGatewaySenderTypeFactory;
import org.apache.geode.cache.wan.internal.serial.SerialGatewaySenderTypeFactory;
import org.apache.geode.cache.wan.internal.txgrouping.parallel.TxGroupingParallelGatewaySenderTypeFactory;
import org.apache.geode.cache.wan.internal.txgrouping.serial.TxGroupingSerialGatewaySenderTypeFactory;
import org.apache.geode.internal.cache.GemFireCacheImpl;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.cache.wan.GatewaySenderAttributes;
Expand Down Expand Up @@ -234,19 +232,29 @@ public GatewaySenderFactory setEnforceThreadsConnectSameReceiver(
final @NotNull GatewaySenderAttributes attributes) {
if (attributes.isParallel()) {
if (attributes.mustGroupTransactionEvents()) {
return new TxGroupingParallelGatewaySenderTypeFactory();
return findGatewaySenderTypeFactory(
"org.apache.geode.cache.wan.internal.txgrouping.parallel.TxGroupingParallelGatewaySenderTypeFactory");
} else {
return new ParallelGatewaySenderTypeFactory();
}
} else {
if (attributes.mustGroupTransactionEvents()) {
return new TxGroupingSerialGatewaySenderTypeFactory();
return findGatewaySenderTypeFactory(
"org.apache.geode.cache.wan.internal.txgrouping.serial.TxGroupingSerialGatewaySenderTypeFactory");
} else {
return new SerialGatewaySenderTypeFactory();
}
}
}

private static GatewaySenderTypeFactory findGatewaySenderTypeFactory(final @NotNull String name) {
try {
return (GatewaySenderTypeFactory) Class.forName(name).newInstance();
} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
throw new GatewaySenderException(format("Can't find GatewaySender factory for %s.", name), e);
}
}

static void validate(final @NotNull InternalCache cache,
final @NotNull GatewaySenderAttributesImpl attributes) {
final int myDSId = cache.getDistributionManager().getDistributedSystemId();
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ include 'geode-lucene'
include 'geode-lucene:geode-lucene-test'
include 'geode-old-client-support'
include 'geode-wan'
include 'geode-wan-txgrouping'
include 'geode-cq'
include 'geode-for-redis'
include 'geode-memcached'
Expand Down

0 comments on commit 0be467b

Please sign in to comment.