You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/05/01 17:53:00 UTC
[29/50] [abbrv] incubator-tinkerpop git commit: Add an example to the
javadoc in the GryoMapper.
Add an example to the javadoc in the GryoMapper.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/0fa302aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/0fa302aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/0fa302aa
Branch: refs/heads/variables
Commit: 0fa302aa0f00f5e25acd59c2df0cb8b364b31fec
Parents: 2e4e2ed
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 30 13:21:25 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 30 13:21:25 2015 -0400
----------------------------------------------------------------------
.../tinkerpop/gremlin/structure/io/gryo/GryoMapper.java | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0fa302aa/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
index 844eea6..7587897 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/gryo/GryoMapper.java
@@ -92,8 +92,9 @@ import java.util.stream.Collectors;
* A {@link Mapper} implementation for Kryo. This implementation requires that all classes to be serialized by
* Kryo are registered to it.
* <p/>
- * {@link Graph} implementations providing an {@link IoRegistry} should register their custom classs and/or
+ * {@link Graph} implementations providing an {@link IoRegistry} should register their custom classes and/or
* serializers in one of three ways:
+ * <p/>
* <ol>
* <li>Register just the custom class with a {@code null} {@link Serializer} implementation</li>
* <li>Register the custom class with a {@link Serializer} implementation</li>
@@ -102,6 +103,14 @@ import java.util.stream.Collectors;
* {@link Serializer} requires the {@link Kryo} instance to get constructed.
* </li>
* </ol>
+ * <p/>
+ * For example:
+ * <pre>
+ * {@code
+ * IoRegistry registry = new IoRegistry();
+ * registry.register(GryoIo.class, MyCustomClass.class, new MyCustomClassSerializer());
+ * }
+ * </pre>
*
* @author Stephen Mallette (http://stephen.genoprime.com)
*/