Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1402

Impossible for graph implementations to provide a class resolver for Gryo IO

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.2.2
    • Component/s: structure
    • Labels:
      None

      Description

      As far as I can tell there is no way for a graph implementation to specify a classresolver for the following code:

      g.io(IoCore.gryo()).writer().create()

      The problem is that inside the graph implementation we need to be able to do this:

      public <I extends Io> I io(final Io.Builder<I> builder) {
        Io io = builder.graph(this).registry(MyRegistry.INSTANCE).classResolver(MyClassReolver.INSTANCE).create();
      

      but only supplying a registry is supported.
      Other solutions could be to design GryoIo for extension so that it can be wrapped or to change the signature of Graph#io to:

      public default Io io(final Io.Builder<I> builder)
      

      I would probably go for the signature change, so the graph is responsible for deciding the implementation that is returned.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                spmallette stephen mallette
                Reporter:
                bryncooke Bryn Cooke
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: