Skip to content

Commit

Permalink
Upgrade Infinispan to 11.0.1.Final
Browse files Browse the repository at this point in the history
  • Loading branch information
karesti committed Jul 28, 2020
1 parent 517024c commit 642c86a
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 22 deletions.
4 changes: 2 additions & 2 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
<testng.version>6.14.2</testng.version>
<assertj.version>3.16.1</assertj.version>
<json-smart.version>2.3</json-smart.version>
<infinispan.version>10.1.5.Final</infinispan.version>
<infinispan.protostream.version>4.3.2.Final</infinispan.protostream.version>
<infinispan.version>11.0.1.Final</infinispan.version>
<infinispan.protostream.version>4.3.3.Final</infinispan.protostream.version>
<caffeine.version>2.8.5</caffeine.version>
<netty.version>4.1.49.Final</netty.version>
<reactive-streams.version>1.0.3</reactive-streams.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.infinispan.client.hotrod.impl.ConfigurationProperties;
import org.infinispan.client.hotrod.logging.Log;
import org.infinispan.client.hotrod.logging.LogFactory;
import org.infinispan.client.hotrod.marshall.ProtoStreamMarshaller;
import org.infinispan.commons.marshall.ProtoStreamMarshaller;
import org.infinispan.commons.util.Util;
import org.infinispan.protostream.BaseMarshaller;
import org.infinispan.protostream.EnumMarshaller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import org.infinispan.client.hotrod.impl.ConfigurationProperties;
import org.infinispan.client.hotrod.logging.Log;
import org.infinispan.client.hotrod.logging.LogFactory;
import org.infinispan.client.hotrod.marshall.ProtoStreamMarshaller;
import org.infinispan.commons.marshall.Marshaller;
import org.infinispan.commons.marshall.ProtoStreamMarshaller;
import org.infinispan.commons.util.Util;
import org.infinispan.counter.api.CounterManager;
import org.infinispan.protostream.BaseMarshaller;
Expand Down Expand Up @@ -296,10 +296,10 @@ void configure(Properties properties) {
}

/**
* Retrieves the deprecated {@link Remote} annotation instance from the set
* Retrieves the deprecated {@link io.quarkus.infinispan.client.Remote} annotation instance from the set
*
* @param annotationSet the annotation set.
* @return the {@link Remote} annotation instance or {@code null} if not found.
* @return the {@link io.quarkus.infinispan.client.Remote} annotation instance or {@code null} if not found.
*/
private io.quarkus.infinispan.client.Remote getRemoteAnnotation(Set<Annotation> annotationSet) {
for (Annotation annotation : annotationSet) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import org.infinispan.client.hotrod.marshall.BytesOnlyMarshaller;
import org.infinispan.commons.marshall.Marshaller;

import com.oracle.svm.core.annotate.Alias;
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;

Expand All @@ -15,11 +14,9 @@
*/
@TargetClass(ConfigurationBuilder.class)
public final class SubstituteConfigurationBuilder {
@Alias
private Marshaller marshaller;

@Substitute
private void handleNullMarshaller() {
marshaller = BytesOnlyMarshaller.INSTANCE;
private Marshaller handleNullMarshaller() {
return BytesOnlyMarshaller.INSTANCE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import javax.management.ObjectName;

import org.infinispan.client.hotrod.configuration.Configuration;
import org.infinispan.client.hotrod.impl.RemoteCacheImpl;
import org.infinispan.client.hotrod.impl.operations.OperationsFactory;
import org.infinispan.commons.marshall.Marshaller;
Expand Down Expand Up @@ -31,7 +32,7 @@ private void unregisterMBean() {
// Sadly this method is public, so technically a user could get a Runtime error if they were referencing
// it before - but it is the only way to make graal happy
@Delete
public void init(Marshaller marshaller, OperationsFactory operationsFactory, int estimateKeySize,
int estimateValueSize, int batchSize, ObjectName jmxParent) {
public void init(Marshaller marshaller, OperationsFactory operationsFactory,
Configuration configuration, ObjectName jmxParent) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.infinispan.client.hotrod.RemoteCacheManager;
import org.infinispan.client.hotrod.configuration.Configuration;
import org.infinispan.client.hotrod.impl.RemoteCacheImpl;
import org.infinispan.client.hotrod.impl.InternalRemoteCache;
import org.infinispan.client.hotrod.impl.operations.OperationsFactory;
import org.infinispan.commons.marshall.Marshaller;

Expand All @@ -23,10 +23,9 @@ public final class SubstituteRemoteCacheManager {
private Configuration configuration;

@Substitute
private void initRemoteCache(RemoteCacheImpl remoteCache, OperationsFactory operationsFactory) {
private void initRemoteCache(InternalRemoteCache<?, ?> remoteCache, OperationsFactory operationsFactory) {
// Invoke the init method that doesn't have the JMX ObjectName argument
remoteCache.init(marshaller, operationsFactory, configuration.keySizeEstimate(),
configuration.valueSizeEstimate(), configuration.batchSize());
remoteCache.init(marshaller, operationsFactory, configuration);
}

@Substitute
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/infinispan-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.10.0</version>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.0</version>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.10.0</version>
<version>2.11.0</version>
</dependency>

</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.Collections;
import java.util.Map;

import org.infinispan.commons.dataconversion.MediaType;
import org.infinispan.commons.test.TestResourceTracker;
import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.configuration.global.GlobalConfigurationBuilder;
Expand All @@ -23,10 +24,14 @@ public class InfinispanServerTestResource implements QuarkusTestResourceLifecycl
@Override
public Map<String, String> start() {
TestResourceTracker.setThreadTestName("InfinispanServer");
ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();
configurationBuilder.encoding().mediaType(MediaType.APPLICATION_PROTOSTREAM_TYPE);
EmbeddedCacheManager ecm = TestCacheManagerFactory.createCacheManager(
new GlobalConfigurationBuilder().nonClusteredDefault().defaultCacheName("default"),
new ConfigurationBuilder());
ecm.defineConfiguration("magazine", new ConfigurationBuilder().build());
configurationBuilder);

ecm.defineConfiguration("magazine", configurationBuilder.build());

// Client connects to a non default port
final HotRodServerConfigurationBuilder hotRodServerConfigurationBuilder = new HotRodServerConfigurationBuilder();
hotRodServerConfigurationBuilder
Expand Down

0 comments on commit 642c86a

Please sign in to comment.