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