org.apache.tinkerpop.gremlin.structure.io.gryo

## Class GryoPool

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.io.gryo.GryoPool

-     public final class GryoPool
      extends Object

  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
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GryoPool.Builder`
    `static class` | `GryoPool.Type`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CONFIG_IO_GRYO_POOL_SIZE`
    `static int` | `CONFIG_IO_GRYO_POOL_SIZE_DEFAULT`
    `static GryoVersion` | `CONFIG_IO_GRYO_POOL_VERSION_DEFAULT`
    `static String` | `CONFIG_IO_GRYO_VERSION`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GryoPool.Builder` | `build()`
    `<A> A` | `doWithReader(Function<GryoReader,A> readerFunction)`
    `void` | `doWithWriter(Consumer<GryoWriter> writerFunction)`
    `GryoMapper` | `getMapper()`
    `void` | `offerKryo(Kryo kryo)`
    `void` | `offerReader(GryoReader gryoReader)`
    `void` | `offerWriter(GryoWriter gryoWriter)`
    `<A> A` | `readWithKryo(Function<Kryo,A> kryoFunction)`
    `Kryo` | `takeKryo()`
    `GryoReader` | `takeReader()`
    `GryoWriter` | `takeWriter()`
    `void` | `writeWithKryo(Consumer<Kryo> kryoConsumer)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CONFIG_IO_GRYO_POOL_SIZE

          public static final String CONFIG_IO_GRYO_POOL_SIZE

      See Also:
        Constant Field Values

    - #### CONFIG_IO_GRYO_VERSION

          public static final String CONFIG_IO_GRYO_VERSION

      See Also:
        Constant Field Values

    - #### CONFIG_IO_GRYO_POOL_SIZE_DEFAULT

          public static final int CONFIG_IO_GRYO_POOL_SIZE_DEFAULT

      See Also:
        Constant Field Values

    - #### CONFIG_IO_GRYO_POOL_VERSION_DEFAULT

          public static final GryoVersion CONFIG_IO_GRYO_POOL_VERSION_DEFAULT

  - ### Method Detail

    - #### build

          public static GryoPool.Builder build()

    - #### getMapper

          public GryoMapper getMapper()

    - #### takeKryo

          public Kryo takeKryo()

    - #### takeReader

          public GryoReader takeReader()

    - #### takeWriter

          public GryoWriter takeWriter()

    - #### offerKryo

          public void offerKryo(Kryo kryo)

    - #### offerReader

          public void offerReader(GryoReader gryoReader)

    - #### offerWriter

          public void offerWriter(GryoWriter gryoWriter)

    - #### readWithKryo

          public <A> A readWithKryo(Function<Kryo,A> kryoFunction)

    - #### writeWithKryo

          public void writeWithKryo(Consumer<Kryo> kryoConsumer)

    - #### doWithReader

          public <A> A doWithReader(Function<GryoReader,A> readerFunction)

    - #### doWithWriter

          public void doWithWriter(Consumer<GryoWriter> writerFunction)

Copyright © 2013–2021 Apache Software Foundation. All rights reserved.