Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Infinispan to 12.1.1.Final #16539

Merged
merged 1 commit into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@
<testng.version>6.14.2</testng.version>
<assertj.version>3.19.0</assertj.version>
<json-smart.version>2.3</json-smart.version>
<infinispan.version>12.0.1.Final</infinispan.version>
<infinispan.protostream.version>4.4.0.Alpha4</infinispan.protostream.version>
<infinispan.version>12.1.1.Final</infinispan.version>
<infinispan.protostream.version>4.4.0.Final</infinispan.protostream.version>
<caffeine.version>2.9.0</caffeine.version>
<netty.version>4.1.60.Final</netty.version>
<reactive-streams.version>1.0.3</reactive-streams.version>
Expand Down Expand Up @@ -4596,6 +4596,11 @@
<artifactId>protostream-processor</artifactId>
<version>${infinispan.protostream.version}</version>
</dependency>
<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream-types</artifactId>
<version>${infinispan.protostream.version}</version>
</dependency>
<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream</artifactId>
Expand Down
21 changes: 4 additions & 17 deletions docs/src/main/asciidoc/infinispan-client.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -147,23 +147,6 @@ Here is an example of how the preceding classes should be changed:
}
----

.BigDecimalAdapter.java
[source,java]
----
@ProtoAdapter(BigDecimal.class)
public class BigDecimalAdapter {
@ProtoFactory
BigDecimal create(Double value) {
return BigDecimal.valueOf(value);
}

@ProtoField(number = 1, type = Type.DOUBLE, defaultValue = "0")
Double value(BigDecimal value) {
return value.doubleValue();
}
}
----

If your classes have only mutable fields, then the `ProtoFactory` annotation
is not required, assuming your class has a no arg constructor.

Expand All @@ -173,6 +156,10 @@ on it to specify configuration settings
.BookContextInitializer.java
[source,java]
----
import org.infinispan.protostream.SerializationContextInitializer;
import org.infinispan.protostream.annotations.AutoProtoSchemaBuilder;
import org.infinispan.protostream.types.java.math.BigDecimalAdapter;

@AutoProtoSchemaBuilder(includeClasses = { Book.class, Author.class, BigDecimalAdapter.class }, schemaPackageName = "book_sample")
interface BookContextInitializer extends SerializationContextInitializer {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,6 @@ InfinispanPropertiesBuildItem setup(ApplicationArchivesBuildItem applicationArch

// This is required for netty to work properly
reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, "io.netty.channel.socket.nio.NioSocketChannel"));
nativeImageConfig.produce(NativeImageConfigBuildItem.builder()
.addRuntimeInitializedClass("org.infinispan.client.hotrod.impl.transport.netty.TransportHelper")
.build());
// We use reflection to have continuous queries work
reflectiveClass.produce(new ReflectiveClassBuildItem(true, false,
"org.infinispan.client.hotrod.event.impl.ContinuousQueryImpl$ClientEntryListener"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.util.concurrent.ExecutorService;

import org.infinispan.client.hotrod.impl.transport.netty.DefaultTransportFactory;

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

Expand All @@ -15,17 +17,16 @@
*
* @author William Burns
*/
@Substitute
@TargetClass(className = "org.infinispan.client.hotrod.impl.transport.netty.TransportHelper")
final class SubstituteTransportHelper {
@TargetClass(DefaultTransportFactory.class)
final class SubstituteDefaultTransportFactory {

@Substitute
static Class<? extends SocketChannel> socketChannel() {
public Class<? extends SocketChannel> socketChannelClass() {
return NioSocketChannel.class;
}

@Substitute
static EventLoopGroup createEventLoopGroup(int maxExecutors, ExecutorService executorService) {
public EventLoopGroup createEventLoopGroup(int maxExecutors, ExecutorService executorService) {
return new NioEventLoopGroup(maxExecutors, executorService);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
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;

import com.oracle.svm.core.annotate.Delete;
import com.oracle.svm.core.annotate.Substitute;
Expand All @@ -32,7 +31,6 @@ 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,
Configuration configuration, ObjectName jmxParent) {
public void init(OperationsFactory operationsFactory, Configuration configuration, ObjectName jmxParent) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public final class SubstituteRemoteCacheManager {
@Substitute
private void initRemoteCache(InternalRemoteCache<?, ?> remoteCache, OperationsFactory operationsFactory) {
// Invoke the init method that doesn't have the JMX ObjectName argument
remoteCache.init(marshaller, operationsFactory, configuration);
remoteCache.init(operationsFactory, configuration);
}

@Substitute
Expand All @@ -34,6 +34,9 @@ private void registerMBean() {

@Substitute
private void unregisterMBean() {
}

@Substitute
private void registerProtoStreamMarshaller() {
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.infinispan.protostream.SerializationContextInitializer;
import org.infinispan.protostream.annotations.AutoProtoSchemaBuilder;
import org.infinispan.protostream.types.java.math.BigDecimalAdapter;

@AutoProtoSchemaBuilder(includeClasses = { Book.class, Type.class, Author.class,
BigDecimalAdapter.class }, schemaPackageName = "book_sample")
Expand Down