Class GryoPool
java.lang.Object
org.apache.tinkerpop.gremlin.structure.io.gryo.GryoPool
Gryo objects are somewhat expensive to construct (given the dependency on Kryo), therefore this pool helps re-use
those objects.
- Author:
- Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic final GryoVersionstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic GryoPool.Builderbuild()<A> AdoWithReader(Function<GryoReader, A> readerFunction) voiddoWithWriter(Consumer<GryoWriter> writerFunction) voidofferKryo(org.apache.tinkerpop.shaded.kryo.Kryo kryo) voidofferReader(GryoReader gryoReader) voidofferWriter(GryoWriter gryoWriter) <A> AreadWithKryo(Function<org.apache.tinkerpop.shaded.kryo.Kryo, A> kryoFunction) org.apache.tinkerpop.shaded.kryo.KryotakeKryo()voidwriteWithKryo(Consumer<org.apache.tinkerpop.shaded.kryo.Kryo> kryoConsumer)
-
Field Details
-
CONFIG_IO_GRYO_POOL_SIZE
- See Also:
-
CONFIG_IO_GRYO_VERSION
- See Also:
-
CONFIG_IO_GRYO_POOL_SIZE_DEFAULT
public static final int CONFIG_IO_GRYO_POOL_SIZE_DEFAULT- See Also:
-
CONFIG_IO_GRYO_POOL_VERSION_DEFAULT
-
-
Method Details
-
build
-
getMapper
-
takeKryo
public org.apache.tinkerpop.shaded.kryo.Kryo takeKryo() -
takeReader
-
takeWriter
-
offerKryo
public void offerKryo(org.apache.tinkerpop.shaded.kryo.Kryo kryo) -
offerReader
-
offerWriter
-
readWithKryo
-
writeWithKryo
-
doWithReader
-
doWithWriter
-