You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Bryn Cooke (JIRA)" <ji...@apache.org> on 2016/08/09 14:20:20 UTC

[jira] [Comment Edited] (TINKERPOP-1402) Impossible for graph implementations to provide a class resolver for Gryo IO

    [ https://issues.apache.org/jira/browse/TINKERPOP-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15413578#comment-15413578 ] 

Bryn Cooke edited comment on TINKERPOP-1402 at 8/9/16 2:19 PM:
---------------------------------------------------------------

I like the onMapper idea and also agree the registry method is redundant.
Trying to unify the serialization apis would seem to be a pretty tall order, onMapper gives implementations the required flexibility. I think that the registry method should be deprecated.


was (Author: bryncooke):
I like the onMapper idea and also agree the registry method is redundant.
Trying to unify the serialization apis would seem to be a pretty tall order, onMapper gives implementations the required flexibility. I think that the registry should be deprecated.

> Impossible for graph implementations to provide a class resolver for Gryo IO
> ----------------------------------------------------------------------------
>
>                 Key: TINKERPOP-1402
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1402
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: structure
>    Affects Versions: 3.2.1
>            Reporter: Bryn Cooke
>            Priority: Critical
>
> As far as I can tell there is no way for a graph implementation to specify a classresolver for the following code:
> {noformat}g.io(IoCore.gryo()).writer().create(){noformat}
> The problem is that inside the graph implementation we need to be able to do this:
> {noformat}
> public <I extends Io> I io(final Io.Builder<I> builder) {
>   Io io = builder.graph(this).registry(MyRegistry.INSTANCE).classResolver(MyClassReolver.INSTANCE).create();
> {noformat}
> 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:
> {noformat}
> public default Io io(final Io.Builder<I> builder)
> {noformat}
> I would probably go for the signature change, so the graph is responsible for deciding the implementation that is returned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)