Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-8735

Enable factory lookup logic to look for symbols in the application

    XMLWordPrintableJSON

Details

    Description

      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:

      <region name="region_part_a">
          <region-attributes refid="CACHING_PROXY"
                                        pool-name="partitioned-pool">
              <partition-resolver library-function-name="createPartitionResolver"/>
          </region-attributes>
      </region>
      

      And within the application defining this function:

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

      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.

      Attachments

        Issue Links

          Activity

            People

              gaussianrecurrence Mario Salazar de Torres
              gaussianrecurrence Mario Salazar de Torres
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: