Mario Salazar de Torres created GEODE-8735:
----------------------------------------------

             Summary: Enable factory lookup logic to look for symbols in the 
application
                 Key: GEODE-8735
                 URL: https://issues.apache.org/jira/browse/GEODE-8735
             Project: Geode
          Issue Type: Improvement
          Components: native client
    Affects Versions: 1.13.1
            Reporter: Mario Salazar de Torres


*AS A* native client contributor
*I WANT* to be able to specify factory names within the application space
*SO THAT* the user does not need to create a separate shared library to load 
several items like partition resolvers, cache loaders, cache writers, partition 
resolvers...

----
*Additional information*
The rationale for this change is that if the user wants to declaratively 
specify a partition resolver, right now the only way is by creating the shared 
library.

So the idea would be to change the current factory implementation, so library 
name is an optional field, and whenever "library-name" is not specified, the 
client will look for symbols within the application instead.

*For example:*

Using this region definition:
{code:xml}
<region name="region_part_a">
    <region-attributes refid="CACHING_PROXY"
                                  pool-name="partitioned-pool">
        <partition-resolver library-function-name="createPartitionResolver"/>
    </region-attributes>
</region>
{code}

And within the application defining this function:

{code:cpp}
APPLICATION_EXPORT PartitionResolver* createPartitionResolver()
{
  return new StringPrefixPartitionResolver{};
}
{code}

You could declaratively create a region which uses the 
StringPrefixPartitionResolver.

*IMPORTANT.* Take into account that documentation should be updated in order to 
indicate that library-name will become an optional field and what it means 
whenever it's not present.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to