]
Galder Zamarreño resolved ISPN-6755.
------------------------------------
Assignee: Krzysztof Sobolewski
Resolution: Won't Fix
Functional API's metadata support is unusable when using
CacheLoaders
---------------------------------------------------------------------
Key: ISPN-6755
URL:
https://issues.jboss.org/browse/ISPN-6755
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 9.0.0.Alpha2
Reporter: Krzysztof Sobolewski
Assignee: Krzysztof Sobolewski
These are the meta parameters used by the Functional API. They are created and updated
when we call EntryView.WriteEntryView.set(value, params...), but this is not the only
source of these parameters. The other is the cache loaders: the return value of
CacheLoader.load() is a MarshalledEntry that contains three values: the key, the value and
the metadata. This is a place where the implementations will want to inject information
like the lifetime (for expiration). The only way to do that currently is to create a
custom implementation of the Metadata interface, but that won't work, partialy because
the Functional API is unfinished in these darker, dustier corners. So when we call
MetaParam.Lookup.findMetaParam(Class<T>), the only supported Metadata implementation
is the MetaParamsInternalMetadata (which external classes can't create because all the
constructors of MetaParams are package-private), and there is a TODO to add
interoperability support.
The PR I'm about to send fixes this by just allowing external classes to instantiate
MetaParams so that they can create MetaParamsInternalMetadata which in turn can be
returned from CacheLoader.load(). But this is just a RFC, as usual.