[Red Hat JIRA] (ISPN-12626) Document @ProtoAdaptor for marshalling of external classes
by Ryan Emerson (Jira)
[ https://issues.redhat.com/browse/ISPN-12626?page=com.atlassian.jira.plugi... ]
Ryan Emerson updated ISPN-12626:
--------------------------------
Description:
Protostream 4.4.0.Alpha4 added support for automatically generating marshallers for external classes via the {{@ProtoAdaptor}} field. This greatly simplifies how a user can marshall third party classes, as it's no longer necessary to implement the {{MessageMarshaller}} interface and explicitly create a {{SerializationContextInitializer}} implementation.
Process for using {{@ProtoAdaptor}}
1. Create an adaptor class and add the {{@ProtoAdaptor}} annotation
{code:java}
@ProtoAdapter(UUID.class)
public class UUIDAdapter {
@ProtoFactory
UUID create(Long mostSigBitsFixed, Long leastSigBitsFixed) {
return new UUID(mostSigBitsFixed, leastSigBitsFixed);
}
@ProtoField(number = 1, type = Type.FIXED64, defaultValue = "0")
Long getMostSigBitsFixed(UUID uuid) {
return uuid.getMostSignificantBits();
}
@ProtoField(number = 2, type = Type.FIXED64, defaultValue = "0")
Long getLeastSigBitsFixed(UUID uuid) {
return uuid.getLeastSignificantBits();
}
}
{code}
2. Register {{UUIDAdapter}} with your {{SerialiazationContextInitializer}} interface (LibraryInitializer in the docs examples).
was:
Protostream 4.4.0.Alpha4 added support for automatically generating marshallers for external classes via the {{@ProtoAdaptor}} field. This greatly simplifies how a user can marshall third party classes, as it's no longer necessary to implement the {{MessageMarshaller}} interface and explicitly create a {{SerializationContextInitializer}} implementation.
Process for using {{@ProtoAdaptor}}
# Create an adaptor class and add the {{@ProtoAdaptor}} annotation
{code:java}
@ProtoAdapter(UUID.class)
public class UUIDAdapter {
@ProtoFactory
UUID create(Long mostSigBitsFixed, Long leastSigBitsFixed) {
return new UUID(mostSigBitsFixed, leastSigBitsFixed);
}
@ProtoField(number = 1, type = Type.FIXED64, defaultValue = "0")
Long getMostSigBitsFixed(UUID uuid) {
return uuid.getMostSignificantBits();
}
@ProtoField(number = 2, type = Type.FIXED64, defaultValue = "0")
Long getLeastSigBitsFixed(UUID uuid) {
return uuid.getLeastSignificantBits();
}
}
{code}
# Register {{UUIDAdapter}} with your {{SerialiazationContextInitializer}} interface (LibraryInitializer in the docs examples).
> Document @ProtoAdaptor for marshalling of external classes
> ----------------------------------------------------------
>
> Key: ISPN-12626
> URL: https://issues.redhat.com/browse/ISPN-12626
> Project: Infinispan
> Issue Type: Task
> Components: Documentation
> Affects Versions: 12.0.0.CR1
> Reporter: Ryan Emerson
> Assignee: Donald Naro
> Priority: Major
> Fix For: 12.0.0.Final
>
>
> Protostream 4.4.0.Alpha4 added support for automatically generating marshallers for external classes via the {{@ProtoAdaptor}} field. This greatly simplifies how a user can marshall third party classes, as it's no longer necessary to implement the {{MessageMarshaller}} interface and explicitly create a {{SerializationContextInitializer}} implementation.
> Process for using {{@ProtoAdaptor}}
> 1. Create an adaptor class and add the {{@ProtoAdaptor}} annotation
> {code:java}
> @ProtoAdapter(UUID.class)
> public class UUIDAdapter {
> @ProtoFactory
> UUID create(Long mostSigBitsFixed, Long leastSigBitsFixed) {
> return new UUID(mostSigBitsFixed, leastSigBitsFixed);
> }
> @ProtoField(number = 1, type = Type.FIXED64, defaultValue = "0")
> Long getMostSigBitsFixed(UUID uuid) {
> return uuid.getMostSignificantBits();
> }
> @ProtoField(number = 2, type = Type.FIXED64, defaultValue = "0")
> Long getLeastSigBitsFixed(UUID uuid) {
> return uuid.getLeastSignificantBits();
> }
> }
> {code}
> 2. Register {{UUIDAdapter}} with your {{SerialiazationContextInitializer}} interface (LibraryInitializer in the docs examples).
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (ISPN-12626) Document @ProtoAdaptor for marshalling of external classes
by Ryan Emerson (Jira)
Ryan Emerson created ISPN-12626:
-----------------------------------
Summary: Document @ProtoAdaptor for marshalling of external classes
Key: ISPN-12626
URL: https://issues.redhat.com/browse/ISPN-12626
Project: Infinispan
Issue Type: Task
Components: Documentation
Affects Versions: 12.0.0.CR1
Reporter: Ryan Emerson
Assignee: Donald Naro
Fix For: 12.0.0.Final
Protostream 4.4.0.Alpha4 added support for automatically generating marshallers for external classes via the {{@ProtoAdaptor}} field. This greatly simplifies how a user can marshall third party classes, as it's no longer necessary to implement the {{MessageMarshaller}} interface and explicitly create a {{SerializationContextInitializer}} implementation.
Process for using {{@ProtoAdaptor}}
# Create an adaptor class and add the {{@ProtoAdaptor}} annotation
{code:java}
@ProtoAdapter(UUID.class)
public class UUIDAdapter {
@ProtoFactory
UUID create(Long mostSigBitsFixed, Long leastSigBitsFixed) {
return new UUID(mostSigBitsFixed, leastSigBitsFixed);
}
@ProtoField(number = 1, type = Type.FIXED64, defaultValue = "0")
Long getMostSigBitsFixed(UUID uuid) {
return uuid.getMostSignificantBits();
}
@ProtoField(number = 2, type = Type.FIXED64, defaultValue = "0")
Long getLeastSigBitsFixed(UUID uuid) {
return uuid.getLeastSignificantBits();
}
}
{code}
# Register {{UUIDAdapter}} with your {{SerialiazationContextInitializer}} interface (LibraryInitializer in the docs examples).
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (ISPN-12625) multiple cache containers are possible but not recommended/supported
by Wolf-Dieter Fink (Jira)
Wolf-Dieter Fink created ISPN-12625:
---------------------------------------
Summary: multiple cache containers are possible but not recommended/supported
Key: ISPN-12625
URL: https://issues.redhat.com/browse/ISPN-12625
Project: Infinispan
Issue Type: Bug
Components: Configuration, Core
Affects Versions: 11.0.8.Final, 12.0.0.CR1
Reporter: Wolf-Dieter Fink
It is possible by XSD to create multiple cache-container elements.
As it is not meant to be used the configuration should not allow multiple cache-container elements!
As effect the instance will start but the API or for server the CLI and Console can not handle it.
The console will show one cache-container but caches from both.
CLI will display only one cache-container and access to caches or use tab-compl. will fail with and IllegalState
> cache s114:00:44,356 ERROR [AeshCommandRuntime] Runtime exception when completing: Buffer: cache s1, Cursor:8, Offset:0, IgnoreOffset:false, Append separator: true, Candidates:[] java.lang.IllegalStateException: Command invoked from the wrong context
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (ISPN-12523) Obtaining internal caches from HotRod causes extra registration of SourceMigrators
by Tristan Tarrant (Jira)
[ https://issues.redhat.com/browse/ISPN-12523?page=com.atlassian.jira.plugi... ]
Tristan Tarrant updated ISPN-12523:
-----------------------------------
Fix Version/s: 9.4.22.Final
12.0.0.Final
11.0.9.Final
Resolution: Done
Status: Resolved (was: Pull Request Sent)
> Obtaining internal caches from HotRod causes extra registration of SourceMigrators
> ----------------------------------------------------------------------------------
>
> Key: ISPN-12523
> URL: https://issues.redhat.com/browse/ISPN-12523
> Project: Infinispan
> Issue Type: Bug
> Components: Hot Rod
> Affects Versions: 9.4.20.Final, 12.0.0.CR1, 11.0.8.Final
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Priority: Major
> Fix For: 9.4.22.Final, 12.0.0.Final, 11.0.9.Final
>
>
> Internal caches such as {{___protobuf_metadata}} always register a HotRodSourceMigrator when obtained via Hot Rod:
> {code:java}
> remotecacheManager.getCache(ProtobufMetadataManagerConstants.PROTOBUF_METADATA_CACHE_NAME)
> {code}
> This is because HotRod never adds internal caches to the knownCaches instance in order to check access to those caches. Regardless, it should not keep registering SourceMigrators everytime
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (ISPN-12616) Rolling Upgrade fails for caches storing POJOs
by Tristan Tarrant (Jira)
[ https://issues.redhat.com/browse/ISPN-12616?page=com.atlassian.jira.plugi... ]
Tristan Tarrant updated ISPN-12616:
-----------------------------------
Fix Version/s: 11.0.9.Final
Resolution: Done
Status: Resolved (was: Pull Request Sent)
> Rolling Upgrade fails for caches storing POJOs
> ----------------------------------------------
>
> Key: ISPN-12616
> URL: https://issues.redhat.com/browse/ISPN-12616
> Project: Infinispan
> Issue Type: Bug
> Components: Hot Rod, Loaders and Stores
> Affects Versions: 12.0.0.CR1, 11.0.8.Final
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Priority: Major
> Fix For: 11.0.9.Final
>
>
> The Remote Store does not support transcoding yet, and the data conversions are done implicitly by combining the 'hotRodWrapping', 'marshaller' and 'rawValues' configurations.
> The rolling upgrade process forces the remote store to use 'hotRodWrapping', that prevents consuming a cache that stores "application/x-java-objects", since it assumes the data is already in "application/x-jboss-marshalling" format, causing lots of internal issues.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months