[infinispan-issues] [JBoss JIRA] (ISPN-6755) Functional API's metadata support is unusable when using CacheLoaders
Krzysztof Sobolewski (JIRA)
issues at jboss.org
Fri Jun 3 06:57:00 EDT 2016
Krzysztof Sobolewski created ISPN-6755:
------------------------------------------
Summary: 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
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.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the infinispan-issues
mailing list