public static class KryoMapper.BuilderV1d0 extends java.lang.Object implements KryoMapper.Builder
| Constructor and Description |
|---|
BuilderV1d0() |
| Modifier and Type | Method and Description |
|---|---|
KryoMapper.Builder |
addCustom(java.lang.Class... custom)
Add mapper classes to serializes with kryo using standard serialization.
|
KryoMapper.Builder |
addCustom(java.lang.Class clazz,
java.util.function.Function<com.esotericsoftware.kryo.Kryo,com.esotericsoftware.kryo.Serializer> serializer)
Add mapper class to serializes with mapper serialization as returned from a
Function. |
KryoMapper.Builder |
addCustom(java.lang.Class clazz,
com.esotericsoftware.kryo.Serializer serializer)
Add mapper class to serializes with mapper serialization.
|
KryoMapper.Builder |
compliant(java.util.function.BiPredicate<java.lang.Byte,java.lang.Byte> compliant)
By default the
KryoMapper.Builder.extendedVersion(byte) is checked against what is read from an input source and if
those values are equal the version being read is considered "compliant". |
KryoMapper |
create() |
KryoMapper.Builder |
extendedVersion(byte extendedVersion)
If using mapper classes it might be useful to tag the version stamped to the serialization with a mapper
value, such that Kryo serialization at 1.0.0 would have a fourth byte for an extended version.
|
public KryoMapper.Builder addCustom(java.lang.Class... custom)
addCustom in interface KryoMapper.Builderpublic KryoMapper.Builder addCustom(java.lang.Class clazz, com.esotericsoftware.kryo.Serializer serializer)
addCustom in interface KryoMapper.Builderpublic KryoMapper.Builder addCustom(java.lang.Class clazz, java.util.function.Function<com.esotericsoftware.kryo.Kryo,com.esotericsoftware.kryo.Serializer> serializer)
Function.addCustom in interface KryoMapper.Builderpublic KryoMapper.Builder extendedVersion(byte extendedVersion)
Byte.MIN_VALUE. The value supplied here should be greater
than or equal to zero.extendedVersion in interface KryoMapper.Builderpublic KryoMapper.Builder compliant(java.util.function.BiPredicate<java.lang.Byte,java.lang.Byte> compliant)
KryoMapper.Builder.extendedVersion(byte) is checked against what is read from an input source and if
those values are equal the version being read is considered "compliant". To alter this behavior, supply a
mapper compliance Predicate to evaluate the value read from the input source (i.e. first argument)
and the value marked in the GremlinKryo instance {i.e. second argument}. Supplying this function is
useful when versions require backward compatibility or other more complex checks. This function is only used
if the KryoMapper.Builder.extendedVersion(byte) is set to something other than its default.compliant in interface KryoMapper.Builderpublic KryoMapper create()
create in interface KryoMapper.BuilderCopyright © 2013-2015 TinkerPop. All Rights Reserved.