diff --git a/spring-integration-hazelcast/build.gradle b/spring-integration-hazelcast/build.gradle index 9b282bf..34a64c9 100644 --- a/spring-integration-hazelcast/build.gradle +++ b/spring-integration-hazelcast/build.gradle @@ -5,8 +5,7 @@ plugins { id 'jacoco' id 'org.sonarqube' version '2.8' id 'checkstyle' - id 'org.ajoberstar.grgit' version '3.1.1' - id "io.spring.dependency-management" version '1.0.8.RELEASE' + id "io.spring.dependency-management" version '1.0.10.RELEASE' } description = 'Spring Integration Hazelcast Support' @@ -15,7 +14,7 @@ apply from: "${rootProject.projectDir}/publish-maven.gradle" group = 'org.springframework.integration' repositories { - if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) { + if (version.endsWith('SNAPSHOT')) { maven { url 'https://repo.spring.io/libs-snapshot' } } maven { url 'https://repo.spring.io/libs-milestone' } @@ -27,15 +26,15 @@ compileJava { } ext { - hazelcastVersion = '3.12.4' - slf4jVersion = '1.7.28' - springIntegrationVersion = '5.2.1.RELEASE' + hazelcastVersion = '4.0.3' + slf4jVersion = '1.7.30' + springIntegrationVersion = '5.4.0-SNAPSHOT' idPrefix = 'hazelcast' linkHomepage = 'https://github.com/spring-projects/spring-integration-extensions' linkCi = 'https://build.spring.io/browse/INTEXT' - linkIssue = 'https://jira.spring.io/browse/INTEXT' + linkIssue = 'https://github.com/spring-projects/spring-integration-extensions/issues' linkScmUrl = 'https://github.com/spring-projects/spring-integration-extensions' linkScmConnection = 'https://github.com/spring-projects/spring-integration-extensions.git' linkScmDevConnection = 'git@github.com:spring-projects/spring-integration-extensions.git' @@ -52,12 +51,12 @@ sourceSets { } jacoco { - toolVersion = '0.8.4' + toolVersion = '0.8.6' } checkstyle { - configFile = file("$rootDir/src/checkstyle/checkstyle.xml") - toolVersion = '8.25' + configDirectory.set(rootProject.file("src/checkstyle")) + toolVersion = '8.36.2' } // enable all compiler warnings; individual projects may customize further @@ -67,8 +66,6 @@ dependencies { compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion" compile "com.hazelcast:hazelcast:$hazelcastVersion" - testCompile "com.hazelcast:hazelcast-client:$hazelcastVersion" - testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion" testRuntime "org.slf4j:slf4j-log4j12:$slf4jVersion" @@ -80,20 +77,18 @@ test { jvmArgs '-Dhazelcast.logging.type=slf4j' maxHeapSize = '1024m' - jacoco { - append = false - destinationFile = file("$buildDir/jacoco.exec") - } } jacocoTestReport { + dependsOn test reports { xml.enabled false csv.enabled false - html.destination file("${buildDir}/reports/jacoco/html") + html.destination file("$buildDir/reports/jacoco/html") } } + task sourcesJar(type: Jar) { archiveClassifier = 'sources' from sourceSets.main.allJava diff --git a/spring-integration-hazelcast/gradle.properties b/spring-integration-hazelcast/gradle.properties index 182941a..ddf4794 100644 --- a/spring-integration-hazelcast/gradle.properties +++ b/spring-integration-hazelcast/gradle.properties @@ -1 +1,5 @@ -version=2.0.1.BUILD-SNAPSHOT +version=3.0.0-SNAPSHOT +org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8 +org.gradle.caching=true +org.gradle.parallel=true + diff --git a/spring-integration-hazelcast/gradle/wrapper/gradle-wrapper.jar b/spring-integration-hazelcast/gradle/wrapper/gradle-wrapper.jar index 5c2d1cf..e708b1c 100644 Binary files a/spring-integration-hazelcast/gradle/wrapper/gradle-wrapper.jar and b/spring-integration-hazelcast/gradle/wrapper/gradle-wrapper.jar differ diff --git a/spring-integration-hazelcast/gradle/wrapper/gradle-wrapper.properties b/spring-integration-hazelcast/gradle/wrapper/gradle-wrapper.properties index 5028f28..12d38de 100644 --- a/spring-integration-hazelcast/gradle/wrapper/gradle-wrapper.properties +++ b/spring-integration-hazelcast/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/spring-integration-hazelcast/gradlew b/spring-integration-hazelcast/gradlew index 83f2acf..4f906e0 100755 --- a/spring-integration-hazelcast/gradlew +++ b/spring-integration-hazelcast/gradlew @@ -82,6 +82,7 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -129,6 +130,7 @@ fi if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath @@ -154,19 +156,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then else eval `echo args$i`="\"$arg\"" fi - i=$((i+1)) + i=`expr $i + 1` done case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -175,14 +177,9 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=$(save "$@") +APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - exec "$JAVACMD" "$@" diff --git a/spring-integration-hazelcast/gradlew.bat b/spring-integration-hazelcast/gradlew.bat index 24467a1..ac1b06f 100644 --- a/spring-integration-hazelcast/gradlew.bat +++ b/spring-integration-hazelcast/gradlew.bat @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @@ -37,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -51,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -61,28 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/spring-integration-hazelcast/src/checkstyle/checkstyle.xml b/spring-integration-hazelcast/src/checkstyle/checkstyle.xml index c262bf5..8073284 100644 --- a/spring-integration-hazelcast/src/checkstyle/checkstyle.xml +++ b/spring-integration-hazelcast/src/checkstyle/checkstyle.xml @@ -11,9 +11,7 @@ - - - + diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheEventType.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheEventType.java index c257534..38cabeb 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheEventType.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/CacheEventType.java @@ -48,6 +48,11 @@ public enum CacheEventType { */ EVICTED, + /** + * The Hazelcast EXPIRED event. + */ + EXPIRED, + /** * The Hazelcast EVICT_ALL event. */ diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/ClusterMonitorType.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/ClusterMonitorType.java index 95529ef..fc86b29 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/ClusterMonitorType.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/ClusterMonitorType.java @@ -25,11 +25,8 @@ package org.springframework.integration.hazelcast; * @since 1.0.0 * * @see org.springframework.integration.hazelcast.inbound.HazelcastClusterMonitorMessageProducer - * @see com.hazelcast.core.MembershipListener * @see com.hazelcast.core.DistributedObjectListener - * @see com.hazelcast.core.MigrationListener * @see com.hazelcast.core.LifecycleListener - * @see com.hazelcast.core.ClientListener */ public enum ClusterMonitorType { diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/DistributedSQLIterationType.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/DistributedSQLIterationType.java index fee228d..e25ae01 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/DistributedSQLIterationType.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/DistributedSQLIterationType.java @@ -25,27 +25,27 @@ package org.springframework.integration.hazelcast; * @since 1.0.0 * * @see org.springframework.integration.hazelcast.inbound.HazelcastDistributedSQLMessageSource - * @see com.hazelcast.core.IMap + * @see com.hazelcast.map.IMap */ public enum DistributedSQLIterationType { /** - * The {@link com.hazelcast.core.IMap#entrySet()} to iterate. + * The {@link com.hazelcast.map.IMap#entrySet()} to iterate. */ ENTRY, /** - * The {@link com.hazelcast.core.IMap#keySet()} to iterate. + * The {@link com.hazelcast.map.IMap#keySet()} to iterate. */ KEY, /** - * The {@link com.hazelcast.core.IMap#localKeySet()} to iterate. + * The {@link com.hazelcast.map.IMap#localKeySet()} to iterate. */ LOCAL_KEY, /** - * The {@link com.hazelcast.core.IMap#values()} to iterate. + * The {@link com.hazelcast.map.IMap#values()} to iterate. */ VALUE diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidator.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidator.java index c84578a..75b3567 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidator.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidator.java @@ -23,14 +23,14 @@ import java.util.Set; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; +import com.hazelcast.collection.IList; +import com.hazelcast.collection.IQueue; +import com.hazelcast.collection.ISet; import com.hazelcast.core.DistributedObject; -import com.hazelcast.core.IList; -import com.hazelcast.core.IMap; -import com.hazelcast.core.IQueue; -import com.hazelcast.core.ISet; -import com.hazelcast.core.ITopic; -import com.hazelcast.core.MultiMap; -import com.hazelcast.core.ReplicatedMap; +import com.hazelcast.map.IMap; +import com.hazelcast.multimap.MultiMap; +import com.hazelcast.replicatedmap.ReplicatedMap; +import com.hazelcast.topic.ITopic; /** * Common Validator for Hazelcast Integration. It validates cache types and events. diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastLocalInstanceRegistrar.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastLocalInstanceRegistrar.java index b1e6ad4..fe99e30 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastLocalInstanceRegistrar.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/HazelcastLocalInstanceRegistrar.java @@ -25,14 +25,15 @@ import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.SmartInitializingSingleton; import org.springframework.integration.hazelcast.listener.HazelcastMembershipListener; +import com.hazelcast.cluster.MembershipListener; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.core.MultiMap; +import com.hazelcast.multimap.MultiMap; /** * This class creates an internal configuration {@link MultiMap} to cache Hazelcast instances' socket * address information which used Hazelcast event-driven inbound channel adapter(s). It - * also enables a Hazelcast {@link com.hazelcast.core.MembershipListener} to listen for + * also enables a Hazelcast {@link MembershipListener} to listen for * membership updates. * * @author Eren Avsarogullari diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/AbstractHazelcastMessageProducer.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/AbstractHazelcastMessageProducer.java index 009cd54..de911c1 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/AbstractHazelcastMessageProducer.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/AbstractHazelcastMessageProducer.java @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; +import java.util.UUID; import org.springframework.integration.endpoint.MessageProducerSupport; import org.springframework.integration.hazelcast.CacheEventType; @@ -34,15 +35,15 @@ import org.springframework.integration.hazelcast.message.EntryEventMessagePayloa import org.springframework.messaging.Message; import org.springframework.util.Assert; -import com.hazelcast.core.AbstractIMapEvent; import com.hazelcast.core.DistributedObject; import com.hazelcast.core.EntryEvent; import com.hazelcast.core.EntryListener; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.core.MapEvent; -import com.hazelcast.core.MultiMap; import com.hazelcast.instance.EndpointQualifier; +import com.hazelcast.map.AbstractIMapEvent; +import com.hazelcast.map.MapEvent; +import com.hazelcast.multimap.MultiMap; /** * Hazelcast Base Event-Driven Message Producer. @@ -58,7 +59,7 @@ public abstract class AbstractHazelcastMessageProducer extends MessageProducerSu private volatile CacheListeningPolicyType cacheListeningPolicy = CacheListeningPolicyType.SINGLE; - private volatile String hazelcastRegisteredEventListenerId; + private volatile UUID hazelcastRegisteredEventListenerId; private Set cacheEvents = Collections.singleton(CacheEventType.ADDED.name()); @@ -89,11 +90,11 @@ public abstract class AbstractHazelcastMessageProducer extends MessageProducerSu this.cacheListeningPolicy = cacheListeningPolicy; } - protected String getHazelcastRegisteredEventListenerId() { + protected UUID getHazelcastRegisteredEventListenerId() { return this.hazelcastRegisteredEventListenerId; } - protected void setHazelcastRegisteredEventListenerId(String hazelcastRegisteredEventListenerId) { + protected void setHazelcastRegisteredEventListenerId(UUID hazelcastRegisteredEventListenerId) { this.hazelcastRegisteredEventListenerId = hazelcastRegisteredEventListenerId; } @@ -177,6 +178,11 @@ public abstract class AbstractHazelcastMessageProducer extends MessageProducerSu processEvent(event); } + @Override + public void entryExpired(EntryEvent event) { + processEvent(event); + } + @Override public void mapEvicted(MapEvent event) { processEvent(event); diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorMessageProducer.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorMessageProducer.java index 162ca88..2060c17 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorMessageProducer.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorMessageProducer.java @@ -19,6 +19,7 @@ package org.springframework.integration.hazelcast.inbound; import java.util.Collections; import java.util.Map; import java.util.Set; +import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import org.springframework.integration.endpoint.MessageProducerSupport; @@ -26,18 +27,18 @@ import org.springframework.integration.hazelcast.ClusterMonitorType; import org.springframework.integration.hazelcast.HazelcastIntegrationDefinitionValidator; import org.springframework.util.Assert; -import com.hazelcast.core.Client; -import com.hazelcast.core.ClientListener; +import com.hazelcast.client.Client; +import com.hazelcast.client.ClientListener; +import com.hazelcast.cluster.MembershipEvent; +import com.hazelcast.cluster.MembershipListener; import com.hazelcast.core.DistributedObjectEvent; import com.hazelcast.core.DistributedObjectListener; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.core.LifecycleEvent; import com.hazelcast.core.LifecycleListener; -import com.hazelcast.core.MemberAttributeEvent; -import com.hazelcast.core.MembershipEvent; -import com.hazelcast.core.MembershipListener; -import com.hazelcast.core.MigrationEvent; -import com.hazelcast.core.MigrationListener; +import com.hazelcast.partition.MigrationListener; +import com.hazelcast.partition.MigrationState; +import com.hazelcast.partition.ReplicaMigrationEvent; /** * Hazelcast Cluster Monitor Event Driven Message Producer is a message producer which @@ -45,6 +46,8 @@ import com.hazelcast.core.MigrationListener; * listener in order to listen cluster related events and sends events to related channel. * * @author Eren Avsarogullari + * @author Artem Bilan + * * @since 1.0.0 */ public class HazelcastClusterMonitorMessageProducer extends MessageProducerSupport { @@ -53,7 +56,7 @@ public class HazelcastClusterMonitorMessageProducer extends MessageProducerSuppo private Set monitorTypes = Collections.singleton(ClusterMonitorType.MEMBERSHIP.name()); - private final Map hazelcastRegisteredListenerIdMap = new ConcurrentHashMap<>(5); + private final Map hazelcastRegisteredListenerIdMap = new ConcurrentHashMap<>(5); public HazelcastClusterMonitorMessageProducer(HazelcastInstance hazelcastInstance) { Assert.notNull(hazelcastInstance, "'hazelcastInstance' must not be null"); @@ -72,31 +75,31 @@ public class HazelcastClusterMonitorMessageProducer extends MessageProducerSuppo final HazelcastClusterMonitorListener clusterMonitorListener = new HazelcastClusterMonitorListener(); if (this.monitorTypes.contains(ClusterMonitorType.MEMBERSHIP.name())) { - final String registrationId = this.hazelcastInstance.getCluster() + final UUID registrationId = this.hazelcastInstance.getCluster() .addMembershipListener(clusterMonitorListener); this.hazelcastRegisteredListenerIdMap.put(ClusterMonitorType.MEMBERSHIP, registrationId); } if (this.monitorTypes.contains(ClusterMonitorType.DISTRIBUTED_OBJECT.name())) { - final String registrationId = this.hazelcastInstance + final UUID registrationId = this.hazelcastInstance .addDistributedObjectListener(clusterMonitorListener); this.hazelcastRegisteredListenerIdMap.put(ClusterMonitorType.DISTRIBUTED_OBJECT, registrationId); } if (this.monitorTypes.contains(ClusterMonitorType.MIGRATION.name())) { - final String registrationId = this.hazelcastInstance.getPartitionService() + final UUID registrationId = this.hazelcastInstance.getPartitionService() .addMigrationListener(clusterMonitorListener); this.hazelcastRegisteredListenerIdMap.put(ClusterMonitorType.MIGRATION, registrationId); } if (this.monitorTypes.contains(ClusterMonitorType.LIFECYCLE.name())) { - final String registrationId = this.hazelcastInstance.getLifecycleService() + final UUID registrationId = this.hazelcastInstance.getLifecycleService() .addLifecycleListener(clusterMonitorListener); this.hazelcastRegisteredListenerIdMap.put(ClusterMonitorType.LIFECYCLE, registrationId); } if (this.monitorTypes.contains(ClusterMonitorType.CLIENT.name())) { - final String registrationId = this.hazelcastInstance.getClientService() + final UUID registrationId = this.hazelcastInstance.getClientService() .addClientListener(clusterMonitorListener); this.hazelcastRegisteredListenerIdMap.put(ClusterMonitorType.CLIENT, registrationId); } @@ -105,7 +108,7 @@ public class HazelcastClusterMonitorMessageProducer extends MessageProducerSuppo @Override protected void doStop() { if (this.hazelcastInstance.getLifecycleService().isRunning()) { - String id = this.hazelcastRegisteredListenerIdMap.remove(ClusterMonitorType.MEMBERSHIP); + UUID id = this.hazelcastRegisteredListenerIdMap.remove(ClusterMonitorType.MEMBERSHIP); if (id != null) { this.hazelcastInstance.getCluster().removeMembershipListener(id); } @@ -160,11 +163,6 @@ public class HazelcastClusterMonitorMessageProducer extends MessageProducerSuppo processEvent(membershipEvent); } - @Override - public void memberAttributeChanged(MemberAttributeEvent memberAttributeEvent) { - processEvent(memberAttributeEvent); - } - @Override public void distributedObjectCreated(DistributedObjectEvent event) { processEvent(event); @@ -176,18 +174,23 @@ public class HazelcastClusterMonitorMessageProducer extends MessageProducerSuppo } @Override - public void migrationStarted(MigrationEvent migrationEvent) { + public void migrationStarted(MigrationState migrationEvent) { processEvent(migrationEvent); } @Override - public void migrationCompleted(MigrationEvent migrationEvent) { + public void migrationFinished(MigrationState migrationEvent) { processEvent(migrationEvent); } @Override - public void migrationFailed(MigrationEvent migrationEvent) { - processEvent(migrationEvent); + public void replicaMigrationCompleted(ReplicaMigrationEvent event) { + processEvent(event); + } + + @Override + public void replicaMigrationFailed(ReplicaMigrationEvent event) { + processEvent(event); } @Override diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastContinuousQueryMessageProducer.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastContinuousQueryMessageProducer.java index 6870b96..10fcb5a 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastContinuousQueryMessageProducer.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastContinuousQueryMessageProducer.java @@ -18,9 +18,8 @@ package org.springframework.integration.hazelcast.inbound; import org.springframework.util.Assert; -import com.hazelcast.core.IMap; -import com.hazelcast.map.listener.MapListener; -import com.hazelcast.query.SqlPredicate; +import com.hazelcast.map.IMap; +import com.hazelcast.query.impl.predicates.SqlPredicate; /** * Hazelcast Continuous Query Message Producer is a message producer which enables @@ -48,11 +47,11 @@ public class HazelcastContinuousQueryMessageProducer extends AbstractHazelcastMe this.includeValue = includeValue; } - @SuppressWarnings({"rawtypes", "unchecked"}) + @SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected void doStart() { setHazelcastRegisteredEventListenerId(((IMap) this.distributedObject) - .addEntryListener((MapListener) new HazelcastEntryListener(), new SqlPredicate(this.predicate), + .addEntryListener(new HazelcastEntryListener(), new SqlPredicate(this.predicate), this.includeValue)); } diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLMessageSource.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLMessageSource.java index 4fc26af..5e89c06 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLMessageSource.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLMessageSource.java @@ -24,8 +24,8 @@ import org.springframework.integration.hazelcast.DistributedSQLIterationType; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; -import com.hazelcast.core.IMap; -import com.hazelcast.query.SqlPredicate; +import com.hazelcast.map.IMap; +import com.hazelcast.query.impl.predicates.SqlPredicate; /** * Hazelcast Distributed SQL Message Source is a message source which runs defined @@ -61,6 +61,7 @@ public class HazelcastDistributedSQLMessageSource extends AbstractMessageSource } @Override + @SuppressWarnings("unchecked") protected Collection doReceive() { switch (this.iterationType) { case ENTRY: diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastEventDrivenMessageProducer.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastEventDrivenMessageProducer.java index f873b5b..a16e51d 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastEventDrivenMessageProducer.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/inbound/HazelcastEventDrivenMessageProducer.java @@ -23,20 +23,20 @@ import org.springframework.integration.hazelcast.HazelcastHeaders; import org.springframework.integration.hazelcast.HazelcastIntegrationDefinitionValidator; import org.springframework.util.Assert; +import com.hazelcast.collection.IList; +import com.hazelcast.collection.IQueue; +import com.hazelcast.collection.ISet; +import com.hazelcast.collection.ItemEvent; +import com.hazelcast.collection.ItemListener; import com.hazelcast.core.DistributedObject; -import com.hazelcast.core.IList; -import com.hazelcast.core.IMap; -import com.hazelcast.core.IQueue; -import com.hazelcast.core.ISet; -import com.hazelcast.core.ITopic; -import com.hazelcast.core.ItemEvent; -import com.hazelcast.core.ItemListener; -import com.hazelcast.core.Message; -import com.hazelcast.core.MessageListener; -import com.hazelcast.core.MultiMap; -import com.hazelcast.core.ReplicatedMap; import com.hazelcast.instance.EndpointQualifier; +import com.hazelcast.map.IMap; import com.hazelcast.map.listener.MapListener; +import com.hazelcast.multimap.MultiMap; +import com.hazelcast.replicatedmap.ReplicatedMap; +import com.hazelcast.topic.ITopic; +import com.hazelcast.topic.Message; +import com.hazelcast.topic.MessageListener; /** * Hazelcast Event Driven Message Producer is a message producer which enables diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/listener/HazelcastMembershipListener.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/listener/HazelcastMembershipListener.java index 4630bd9..594bb48 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/listener/HazelcastMembershipListener.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/listener/HazelcastMembershipListener.java @@ -22,12 +22,12 @@ import java.util.concurrent.locks.Lock; import org.springframework.integration.hazelcast.HazelcastLocalInstanceRegistrar; +import com.hazelcast.cluster.MembershipAdapter; +import com.hazelcast.cluster.MembershipEvent; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.core.MembershipAdapter; -import com.hazelcast.core.MembershipEvent; -import com.hazelcast.core.MultiMap; import com.hazelcast.instance.EndpointQualifier; +import com.hazelcast.multimap.MultiMap; /** * Hazelcast {@link MembershipAdapter} in order to listen for membership updates in the cluster. diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/metadata/HazelcastMetadataStore.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/metadata/HazelcastMetadataStore.java index 96796cc..2b2fe91 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/metadata/HazelcastMetadataStore.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/metadata/HazelcastMetadataStore.java @@ -26,7 +26,7 @@ import org.springframework.util.Assert; import com.hazelcast.core.EntryEvent; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.core.IMap; +import com.hazelcast.map.IMap; import com.hazelcast.map.listener.EntryAddedListener; import com.hazelcast.map.listener.EntryRemovedListener; import com.hazelcast.map.listener.EntryUpdatedListener; diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/outbound/HazelcastCacheWritingMessageHandler.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/outbound/HazelcastCacheWritingMessageHandler.java index 3262c39..b5a07bb 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/outbound/HazelcastCacheWritingMessageHandler.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/outbound/HazelcastCacheWritingMessageHandler.java @@ -28,8 +28,8 @@ import org.springframework.messaging.Message; import org.springframework.util.Assert; import com.hazelcast.core.DistributedObject; -import com.hazelcast.core.ITopic; -import com.hazelcast.core.MultiMap; +import com.hazelcast.multimap.MultiMap; +import com.hazelcast.topic.ITopic; /** * MessageHandler implementation that writes {@link Message} or payload to defined diff --git a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/store/HazelcastMessageStore.java b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/store/HazelcastMessageStore.java index 3022653..408407e 100644 --- a/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/store/HazelcastMessageStore.java +++ b/spring-integration-hazelcast/src/main/java/org/springframework/integration/hazelcast/store/HazelcastMessageStore.java @@ -22,8 +22,9 @@ import org.springframework.integration.store.AbstractKeyValueMessageStore; import org.springframework.util.Assert; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.core.IMap; -import com.hazelcast.query.SqlPredicate; +import com.hazelcast.map.IMap; +import com.hazelcast.query.Predicate; +import com.hazelcast.query.impl.predicates.SqlPredicate; /** * The Hazelcast {@link IMap}-based {@link AbstractKeyValueMessageStore} implementation. @@ -76,7 +77,8 @@ public class HazelcastMessageStore extends AbstractKeyValueMessageStore { protected Collection doListKeys(String keyPattern) { Assert.hasText(keyPattern, "'keyPattern' must not be empty"); keyPattern = keyPattern.replaceAll("\\*", "%"); - SqlPredicate sqlPredicate = new SqlPredicate("__key like " + keyPattern); + @SuppressWarnings("unchecked") + Predicate sqlPredicate = new SqlPredicate("__key like " + keyPattern); return this.map.values(sqlPredicate); } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidatorTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidatorTests.java index c1a6a55..e7a79ef 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidatorTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/HazelcastIntegrationDefinitionValidatorTests.java @@ -31,9 +31,9 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import com.hazelcast.collection.IList; import com.hazelcast.core.DistributedObject; -import com.hazelcast.core.IList; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; /** * Hazelcast Integration Definition Validator Test Class diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastCQDistributedMapInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastCQDistributedMapInboundChannelAdapterTests.java index 6e003c5..05677d3 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastCQDistributedMapInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastCQDistributedMapInboundChannelAdapterTests.java @@ -38,8 +38,8 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.hazelcast.core.EntryEventType; -import com.hazelcast.core.IMap; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; +import com.hazelcast.map.IMap; /** * Hazelcast Continuous Query Inbound Channel Adapter Unit Test Class diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorInboundChannelAdapterTests.java index 8837695..71042ee 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastClusterMonitorInboundChannelAdapterTests.java @@ -18,7 +18,6 @@ package org.springframework.integration.hazelcast.inbound; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import org.junit.AfterClass; @@ -34,17 +33,12 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import com.hazelcast.client.HazelcastClient; -import com.hazelcast.client.config.ClientConfig; -import com.hazelcast.config.GroupConfig; -import com.hazelcast.core.Client; -import com.hazelcast.core.ClientType; +import com.hazelcast.client.Client; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.core.IMap; import com.hazelcast.core.LifecycleEvent; import com.hazelcast.core.LifecycleEvent.LifecycleState; -import com.hazelcast.core.MigrationEvent; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; +import com.hazelcast.internal.nio.ConnectionType; /** * Hazelcast Cluster Monitor Inbound Channel Adapter Unit Test Class @@ -92,12 +86,6 @@ public class HazelcastClusterMonitorInboundChannelAdapterTests { HazelcastInstanceFactory.terminateAll(); } - @Test - public void testMembershipEvent() { - HazelcastInboundChannelAdapterTestUtils - .testMembershipEvent(hazelcastInstance, cmChannel1, "testKey1", "testValue1"); - } - @Test public void testDistributedObjectEvent() { HazelcastInboundChannelAdapterTestUtils @@ -105,18 +93,6 @@ public class HazelcastClusterMonitorInboundChannelAdapterTests { hazelcastInstance, "Test_Distributed_Map4"); } - @Test - public void testMigrationEvent() { - final IMap distributedMap = - hazelcastInstance3.getMap("Test_Distributed_Map2"); - distributedMap.put(1, "TestValue1"); - distributedMap.put(2, "TestValue2"); - - hazelcastInstance3.getLifecycleService().terminate(); - final Message msg = this.cmChannel3.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - verifyMigrationEvent(msg); - } - @Test public void testLifecycleEvent() { hazelcastInstance2.getLifecycleService().terminate(); @@ -129,55 +105,6 @@ public class HazelcastClusterMonitorInboundChannelAdapterTests { verifyLifecycleEvent(msg, LifecycleState.SHUTDOWN); } - @Test - public void testClientEvent() { - testClientEventByChannelAndGroupName(cmChannel5, TEST_GROUP_NAME1); - } - - @Test - public void testMultipleMonitorTypes() { - HazelcastInboundChannelAdapterTestUtils - .testDistributedObjectEventByChannelAndHazelcastInstance(cmChannel6, - hazelcastInstance, "Test_Distributed_Map5"); - - HazelcastInboundChannelAdapterTestUtils - .testMembershipEvent(hazelcastInstance, cmChannel6, "testKey2", "testValue2"); - } - - private void testClientEventByChannelAndGroupName(final PollableChannel channel, - final String groupName) { - final HazelcastInstance client = getHazelcastClientByGroupName(groupName); - - Message msg = channel.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - verifyClientEvent(msg); - - client.getLifecycleService().terminate(); - - msg = channel.receive(HazelcastInboundChannelAdapterTestUtils.TIMEOUT); - verifyClientEvent(msg); - } - - private HazelcastInstance getHazelcastClientByGroupName(final String groupName) { - final GroupConfig groupConfig = new GroupConfig(); - groupConfig.setName(groupName); - final ClientConfig cfg = new ClientConfig(); - cfg.setGroupConfig(groupConfig); - cfg.getNetworkConfig().addAddress("127.0.0.1:5701"); - - return HazelcastClient.newHazelcastClient(cfg); - } - - private void verifyMigrationEvent(final Message msg) { - assertNotNull(msg); - assertNotNull(msg.getPayload()); - assertTrue(msg.getPayload() instanceof MigrationEvent); - assertNotNull(((MigrationEvent) msg.getPayload()).getStatus()); - assertNotNull(((MigrationEvent) msg.getPayload()).getNewOwner()); - - // Newer Hazelcast versions doesn't populated 'oldOwner' if we drop member on the same host - assertNull(((MigrationEvent) msg.getPayload()).getOldOwner()); - } - private void verifyLifecycleEvent(final Message msg, final LifecycleState lifecycleState) { assertNotNull(msg); @@ -190,7 +117,7 @@ public class HazelcastClusterMonitorInboundChannelAdapterTests { assertNotNull(msg); assertNotNull(msg.getPayload()); assertTrue(msg.getPayload() instanceof Client); - assertEquals(ClientType.JAVA, ((Client) msg.getPayload()).getClientType()); + assertEquals(ConnectionType.JAVA_CLIENT, ((Client) msg.getPayload()).getClientType()); assertNotNull(((Client) msg.getPayload()).getSocketAddress()); } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedListEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedListEventDrivenInboundChannelAdapterTests.java index 9571533..af079e5 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedListEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedListEventDrivenInboundChannelAdapterTests.java @@ -35,9 +35,9 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import com.hazelcast.collection.IList; import com.hazelcast.core.EntryEventType; -import com.hazelcast.core.IList; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; /** * Hazelcast Distributed List Event Driven Inbound Channel Adapter Test Class diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedMapEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedMapEventDrivenInboundChannelAdapterTests.java index 0011c0d..dc8ec4d 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedMapEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedMapEventDrivenInboundChannelAdapterTests.java @@ -35,8 +35,8 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.hazelcast.core.EntryEventType; -import com.hazelcast.core.IMap; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; +import com.hazelcast.map.IMap; /** * Hazelcast Distributed Map Event Driven Inbound Channel Adapter Test diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedQueueEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedQueueEventDrivenInboundChannelAdapterTests.java index ed77d6c..7c30093 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedQueueEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedQueueEventDrivenInboundChannelAdapterTests.java @@ -33,9 +33,9 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import com.hazelcast.collection.IQueue; import com.hazelcast.core.EntryEventType; -import com.hazelcast.core.IQueue; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; /** * Hazelcast Distributed Queue Event Driven Inbound Channel Adapter Test diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLInboundChannelAdapterTests.java index f18eb86..3fe4c41 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSQLInboundChannelAdapterTests.java @@ -30,8 +30,8 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import com.hazelcast.core.IMap; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; +import com.hazelcast.map.IMap; /** * Hazelcast Distributed SQL Inbound Channel Adapter Test diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSetEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSetEventDrivenInboundChannelAdapterTests.java index 7f8c0fd..6f782f5 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSetEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedSetEventDrivenInboundChannelAdapterTests.java @@ -33,9 +33,9 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import com.hazelcast.collection.ISet; import com.hazelcast.core.EntryEventType; -import com.hazelcast.core.ISet; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; /** * Hazelcast Distributed Set Event Driven Inbound Channel Adapter Test diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedTopicEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedTopicEventDrivenInboundChannelAdapterTests.java index 127f1b0..78a52dc 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedTopicEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastDistributedTopicEventDrivenInboundChannelAdapterTests.java @@ -30,8 +30,8 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import com.hazelcast.core.ITopic; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; +import com.hazelcast.topic.ITopic; /** * Hazelcast Distributed Topic Event Driven Inbound Channel Adapter Test diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastMultiMapEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastMultiMapEventDrivenInboundChannelAdapterTests.java index d6623d2..320efaa 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastMultiMapEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastMultiMapEventDrivenInboundChannelAdapterTests.java @@ -35,8 +35,8 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.hazelcast.core.EntryEventType; -import com.hazelcast.core.MultiMap; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; +import com.hazelcast.multimap.MultiMap; /** * Hazelcast MultiMap Event Driven Inbound Channel Adapter Test diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastReplicatedMapEventDrivenInboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastReplicatedMapEventDrivenInboundChannelAdapterTests.java index 44e7e62..3f3c790 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastReplicatedMapEventDrivenInboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/HazelcastReplicatedMapEventDrivenInboundChannelAdapterTests.java @@ -35,8 +35,8 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.hazelcast.core.EntryEventType; -import com.hazelcast.core.ReplicatedMap; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; +import com.hazelcast.replicatedmap.ReplicatedMap; /** * Hazelcast Replicated Map Event Driven Inbound Channel Adapter Test diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastCQDistributedMapInboundChannelAdapterConfigTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastCQDistributedMapInboundChannelAdapterConfigTests.java index be73bad..c482c7f 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastCQDistributedMapInboundChannelAdapterConfigTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastCQDistributedMapInboundChannelAdapterConfigTests.java @@ -30,7 +30,7 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; -import com.hazelcast.core.IMap; +import com.hazelcast.map.IMap; /** * Hazelcast Continuous Query Inbound Channel Adapter JavaConfig driven Unit Test Class diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastClusterMonitorInboundChannelAdapterConfigTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastClusterMonitorInboundChannelAdapterConfigTests.java index 81a73c4..63b4582 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastClusterMonitorInboundChannelAdapterConfigTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastClusterMonitorInboundChannelAdapterConfigTests.java @@ -48,13 +48,6 @@ public class HazelcastClusterMonitorInboundChannelAdapterConfigTests { @Autowired private HazelcastInstance testHazelcastInstance; - @Test - public void testConfigDrivenMembershipEvent() { - HazelcastInboundChannelAdapterTestUtils - .testMembershipEvent(testHazelcastInstance, cmonChannel, "testKey1", - "testValue1"); - } - @Test public void testConfigDrivenDistributedObjectEvent() { HazelcastInboundChannelAdapterTestUtils diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastDistributedSQLInboundChannelAdapterConfigTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastDistributedSQLInboundChannelAdapterConfigTests.java index 97be0b4..ca82457 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastDistributedSQLInboundChannelAdapterConfigTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastDistributedSQLInboundChannelAdapterConfigTests.java @@ -30,7 +30,7 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; -import com.hazelcast.core.IMap; +import com.hazelcast.map.IMap; /** * Hazelcast Distributed SQL Inbound Channel Adapter JavaConfig driven Unit Test Class diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastEventDrivenInboundChannelAdapterConfigTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastEventDrivenInboundChannelAdapterConfigTests.java index 43586ef..530d45a 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastEventDrivenInboundChannelAdapterConfigTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastEventDrivenInboundChannelAdapterConfigTests.java @@ -30,13 +30,13 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; -import com.hazelcast.core.IList; -import com.hazelcast.core.IMap; -import com.hazelcast.core.IQueue; -import com.hazelcast.core.ISet; -import com.hazelcast.core.ITopic; -import com.hazelcast.core.MultiMap; -import com.hazelcast.core.ReplicatedMap; +import com.hazelcast.collection.IList; +import com.hazelcast.collection.IQueue; +import com.hazelcast.collection.ISet; +import com.hazelcast.map.IMap; +import com.hazelcast.multimap.MultiMap; +import com.hazelcast.replicatedmap.ReplicatedMap; +import com.hazelcast.topic.ITopic; /** * Hazelcast Event Driven Inbound Channel Adapter JavaConfig driven Unit Test Class diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastIntegrationInboundTestConfiguration.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastIntegrationInboundTestConfiguration.java index 42765ce..93b7a32 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastIntegrationInboundTestConfiguration.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/config/HazelcastIntegrationInboundTestConfiguration.java @@ -33,17 +33,17 @@ import org.springframework.integration.hazelcast.inbound.HazelcastDistributedSQL import org.springframework.integration.hazelcast.inbound.HazelcastEventDrivenMessageProducer; import org.springframework.messaging.PollableChannel; +import com.hazelcast.collection.IList; +import com.hazelcast.collection.IQueue; +import com.hazelcast.collection.ISet; import com.hazelcast.config.Config; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.core.IList; -import com.hazelcast.core.IMap; -import com.hazelcast.core.IQueue; -import com.hazelcast.core.ISet; -import com.hazelcast.core.ITopic; -import com.hazelcast.core.MultiMap; -import com.hazelcast.core.ReplicatedMap; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; +import com.hazelcast.map.IMap; +import com.hazelcast.multimap.MultiMap; +import com.hazelcast.replicatedmap.ReplicatedMap; +import com.hazelcast.topic.ITopic; /** * Configuration Class for Hazelcast Integration Inbound Test diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/util/HazelcastInboundChannelAdapterTestUtils.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/util/HazelcastInboundChannelAdapterTestUtils.java index 0fac02b..60d495e 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/util/HazelcastInboundChannelAdapterTestUtils.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/inbound/util/HazelcastInboundChannelAdapterTestUtils.java @@ -35,17 +35,16 @@ import org.springframework.integration.hazelcast.message.EntryEventMessagePayloa import org.springframework.messaging.Message; import org.springframework.messaging.PollableChannel; +import com.hazelcast.cluster.MembershipEvent; +import com.hazelcast.collection.ICollection; import com.hazelcast.core.DistributedObjectEvent; import com.hazelcast.core.EntryEventType; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.core.ICollection; -import com.hazelcast.core.IMap; -import com.hazelcast.core.ITopic; -import com.hazelcast.core.Member; -import com.hazelcast.core.MembershipEvent; -import com.hazelcast.core.MultiMap; -import com.hazelcast.core.ReplicatedMap; +import com.hazelcast.map.IMap; +import com.hazelcast.multimap.MultiMap; +import com.hazelcast.replicatedmap.ReplicatedMap; import com.hazelcast.spi.exception.DistributedObjectDestroyedException; +import com.hazelcast.topic.ITopic; /** * Util Class for Hazelcast Inbound Channel Adapters Test Support. @@ -348,15 +347,6 @@ public final class HazelcastInboundChannelAdapterTestUtils { .next())).getSurname()); } - public static void testMembershipEvent(final HazelcastInstance instance, - final PollableChannel channel, final String key, final String value) { - Member member = instance.getCluster().getLocalMember(); - member.setStringAttribute(key, value); - - Message msg = channel.receive(TIMEOUT); - verifyMembershipEvent(msg, MembershipEvent.MEMBER_ATTRIBUTE_CHANGED); - } - public static void testDistributedObjectEventByChannelAndHazelcastInstance( final PollableChannel channel, final HazelcastInstance hazelcastInstance, final String distributedObjectName) { diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/leader/LeaderInitiatorTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/leader/LeaderInitiatorTests.java index 44239eb..d5fa909 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/leader/LeaderInitiatorTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/leader/LeaderInitiatorTests.java @@ -16,9 +16,10 @@ package org.springframework.integration.hazelcast.leader; -import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.BDDMockito.willAnswer; import static org.mockito.Mockito.spy; @@ -48,7 +49,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.hazelcast.config.Config; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; /** * Tests for hazelcast leader election. @@ -82,9 +83,9 @@ public class LeaderInitiatorTests { @Test public void testLeaderElections() throws Exception { - assertThat(this.candidate.onGrantedLatch.await(5, TimeUnit.SECONDS), is(true)); - assertThat(this.listener.onEventLatch.await(5, TimeUnit.SECONDS), is(true)); - assertThat(this.listener.events.size(), is(1)); + assertTrue(this.candidate.onGrantedLatch.await(5, TimeUnit.SECONDS)); + assertTrue(this.listener.onEventLatch.await(5, TimeUnit.SECONDS)); + assertEquals(1, this.listener.events.size()); this.initiator.destroy(); @@ -101,7 +102,7 @@ public class LeaderInitiatorTests { initiator.start(); } - assertThat(granted.await(10, TimeUnit.SECONDS), is(true)); + assertTrue(granted.await(10, TimeUnit.SECONDS)); LeaderInitiator initiator1 = countingPublisher.initiator; @@ -116,8 +117,8 @@ public class LeaderInitiatorTests { assertNotNull(initiator2); - assertThat(initiator1.getContext().isLeader(), is(true)); - assertThat(initiator2.getContext().isLeader(), is(false)); + assertTrue(initiator1.getContext().isLeader()); + assertFalse(initiator2.getContext().isLeader()); final CountDownLatch granted1 = new CountDownLatch(1); final CountDownLatch granted2 = new CountDownLatch(1); @@ -129,7 +130,7 @@ public class LeaderInitiatorTests { public void publishOnRevoked(Object source, Context context, String role) { try { // It's difficult to see round-robin election, so block one initiator until the second is elected. - assertThat(granted2.await(10, TimeUnit.SECONDS), is(true)); + assertTrue(granted2.await(10, TimeUnit.SECONDS)); } catch (InterruptedException e) { // No op @@ -145,7 +146,7 @@ public class LeaderInitiatorTests { public void publishOnRevoked(Object source, Context context, String role) { try { // It's difficult to see round-robin election, so block one initiator until the second is elected. - assertThat(granted1.await(10, TimeUnit.SECONDS), is(true)); + assertTrue(granted1.await(10, TimeUnit.SECONDS)); } catch (InterruptedException e) { // No op @@ -157,17 +158,17 @@ public class LeaderInitiatorTests { initiator1.getContext().yield(); - assertThat(revoked1.await(10, TimeUnit.SECONDS), is(true)); + assertTrue(revoked1.await(10, TimeUnit.SECONDS)); - assertThat(initiator2.getContext().isLeader(), is(true)); - assertThat(initiator1.getContext().isLeader(), is(false)); + assertTrue(initiator2.getContext().isLeader()); + assertFalse(initiator1.getContext().isLeader()); initiator2.getContext().yield(); - assertThat(revoked2.await(10, TimeUnit.SECONDS), is(true)); + assertTrue(revoked2.await(10, TimeUnit.SECONDS)); - assertThat(initiator1.getContext().isLeader(), is(true)); - assertThat(initiator2.getContext().isLeader(), is(false)); + assertTrue(initiator1.getContext().isLeader()); + assertFalse(initiator2.getContext().isLeader()); initiator2.destroy(); @@ -176,7 +177,7 @@ public class LeaderInitiatorTests { initiator1.getContext().yield(); - assertThat(revoked11.await(10, TimeUnit.SECONDS), is(true)); + assertTrue(revoked11.await(10, TimeUnit.SECONDS)); initiator1.destroy(); @@ -207,9 +208,9 @@ public class LeaderInitiatorTests { initiator.start(); - assertThat(onGranted.await(5, TimeUnit.SECONDS), is(true)); + assertTrue(onGranted.await(5, TimeUnit.SECONDS)); - assertThat(initiator.getContext().isLeader(), is(true)); + assertTrue(initiator.getContext().isLeader()); initiator.destroy(); } diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/lock/HazelcastLockRegistryTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/lock/HazelcastLockRegistryTests.java index d9853a8..a6bf4c8 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/lock/HazelcastLockRegistryTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/lock/HazelcastLockRegistryTests.java @@ -39,7 +39,7 @@ import com.hazelcast.config.Config; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.cp.lock.FencedLock; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; /** * @author Artem Bilan diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/metadata/HazelcastMetadataStoreTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/metadata/HazelcastMetadataStoreTests.java index d191a7c..e1d0a47 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/metadata/HazelcastMetadataStoreTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/metadata/HazelcastMetadataStoreTests.java @@ -32,7 +32,7 @@ import org.springframework.integration.metadata.MetadataStoreListener; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.core.IMap; +import com.hazelcast.map.IMap; /** * @author Vinicius Carvalho diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/HazelcastOutboundChannelAdapterTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/HazelcastOutboundChannelAdapterTests.java index 5dda7b4..2d00378 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/HazelcastOutboundChannelAdapterTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/HazelcastOutboundChannelAdapterTests.java @@ -56,10 +56,10 @@ import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import com.hazelcast.core.ITopic; -import com.hazelcast.core.MultiMap; -import com.hazelcast.core.ReplicatedMap; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; +import com.hazelcast.multimap.MultiMap; +import com.hazelcast.replicatedmap.ReplicatedMap; +import com.hazelcast.topic.ITopic; /** * Hazelcast Outbound Channel Adapter Test Class. diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastIntegrationOutboundTestConfiguration.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastIntegrationOutboundTestConfiguration.java index 38a7a62..20df72f 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastIntegrationOutboundTestConfiguration.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastIntegrationOutboundTestConfiguration.java @@ -39,11 +39,11 @@ import org.springframework.messaging.MessageChannel; import com.hazelcast.core.DistributedObject; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.core.IMap; -import com.hazelcast.core.ITopic; -import com.hazelcast.core.MultiMap; -import com.hazelcast.core.ReplicatedMap; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; +import com.hazelcast.map.IMap; +import com.hazelcast.multimap.MultiMap; +import com.hazelcast.replicatedmap.ReplicatedMap; +import com.hazelcast.topic.ITopic; /** * Configuration Class for Hazelcast Integration Outbound Test diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastOutboundChannelAdapterConfigTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastOutboundChannelAdapterConfigTests.java index b054799..ac892bf 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastOutboundChannelAdapterConfigTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/config/HazelcastOutboundChannelAdapterConfigTests.java @@ -37,11 +37,11 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; -import com.hazelcast.core.IMap; -import com.hazelcast.core.ITopic; -import com.hazelcast.core.MultiMap; -import com.hazelcast.core.ReplicatedMap; -import com.hazelcast.instance.HazelcastInstanceFactory; +import com.hazelcast.instance.impl.HazelcastInstanceFactory; +import com.hazelcast.map.IMap; +import com.hazelcast.multimap.MultiMap; +import com.hazelcast.replicatedmap.ReplicatedMap; +import com.hazelcast.topic.ITopic; /** * Hazelcast Outbound Channel Adapter JavaConfig driven Unit Test Class diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/util/HazelcastOutboundChannelAdapterTestUtils.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/util/HazelcastOutboundChannelAdapterTestUtils.java index 4ccf7d9..0805a08 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/util/HazelcastOutboundChannelAdapterTestUtils.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/outbound/util/HazelcastOutboundChannelAdapterTestUtils.java @@ -39,10 +39,10 @@ import org.springframework.integration.hazelcast.HazelcastTestRequestHandlerAdvi import org.springframework.messaging.MessageChannel; import org.springframework.messaging.support.GenericMessage; -import com.hazelcast.core.ITopic; -import com.hazelcast.core.MessageListener; -import com.hazelcast.core.MultiMap; -import com.hazelcast.core.ReplicatedMap; +import com.hazelcast.multimap.MultiMap; +import com.hazelcast.replicatedmap.ReplicatedMap; +import com.hazelcast.topic.ITopic; +import com.hazelcast.topic.MessageListener; /** * Util Class for Hazelcast Outbound Channel Adapter Test Support @@ -169,7 +169,7 @@ public final class HazelcastOutboundChannelAdapterTestUtils { private int index = 1; @Override - public void onMessage(com.hazelcast.core.Message message) { + public void onMessage(com.hazelcast.topic.Message message) { HazelcastIntegrationTestUser user = (HazelcastIntegrationTestUser) message.getMessageObject(); verifyHazelcastIntegrationTestUser(user, index); diff --git a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/store/HazelcastMessageStoreTests.java b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/store/HazelcastMessageStoreTests.java index 04cd4ac..b3758b0 100644 --- a/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/store/HazelcastMessageStoreTests.java +++ b/spring-integration-hazelcast/src/test/java/org/springframework/integration/hazelcast/store/HazelcastMessageStoreTests.java @@ -40,7 +40,7 @@ import org.springframework.messaging.support.GenericMessage; import com.hazelcast.core.Hazelcast; import com.hazelcast.core.HazelcastInstance; -import com.hazelcast.core.IMap; +import com.hazelcast.map.IMap; /** * @author Vinicius Carvalho