[
https://issues.redhat.com/browse/ISPN-12637?page=com.atlassian.jira.plugi...
]
Donald Naro updated ISPN-12637:
-------------------------------
Description:
https://infinispan.org/docs/stable/titles/configuring/configuring.html#cu...
Remove the following section from the configuration guide:
Custom Classes with Memory-Based Eviction
You must use binary or off-heap storage memory based eviction, as in the following
examples:
Declarative configuration
<!-- Enable memory based eviction with 1 GB/> -->
<memory>
<binary size="1000000000" eviction="MEMORY"/>
</memory>
Programmatic configuration
Configuration c = new ConfigurationBuilder()
.memory()
.storageType(StorageType.BINARY)
.evictionType(EvictionType.MEMORY)
.size(1_000_000_000)
.build();
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}}
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).
Remove superfluous config example from eviction content
-------------------------------------------------------
Key: ISPN-12637
URL:
https://issues.redhat.com/browse/ISPN-12637
Project: Infinispan
Issue Type: Task
Components: Documentation
Affects Versions: 12.0.0.CR1
Reporter: Donald Naro
Assignee: Donald Naro
Priority: Major
Fix For: 12.0.0.Final
https://infinispan.org/docs/stable/titles/configuring/configuring.html#cu...
Remove the following section from the configuration guide:
Custom Classes with Memory-Based Eviction
You must use binary or off-heap storage memory based eviction, as in the following
examples:
Declarative configuration
<!-- Enable memory based eviction with 1 GB/> -->
<memory>
<binary size="1000000000" eviction="MEMORY"/>
</memory>
Programmatic configuration
Configuration c = new ConfigurationBuilder()
.memory()
.storageType(StorageType.BINARY)
.evictionType(EvictionType.MEMORY)
.size(1_000_000_000)
.build();
--
This message was sent by Atlassian Jira
(v8.13.1#813001)