Class KryoPoolQueueImpl

java.lang.Object
com.esotericsoftware.kryo.pool.KryoPoolQueueImpl
All Implemented Interfaces:
KryoPool

class KryoPoolQueueImpl extends Object implements KryoPool
A simple Queue based KryoPool implementation, should be built using the KryoPool.Builder.
  • Field Details

  • Constructor Details

  • Method Details

    • size

      public int size()
    • borrow

      public Kryo borrow()
      Description copied from interface: KryoPool
      Takes a Kryo instance from the pool or creates a new one (using the factory) if the pool is empty.
      Specified by:
      borrow in interface KryoPool
    • release

      public void release(Kryo kryo)
      Description copied from interface: KryoPool
      Returns the given Kryo instance to the pool.
      Specified by:
      release in interface KryoPool
    • run

      public <T> T run(KryoCallback<T> callback)
      Description copied from interface: KryoPool
      Runs the provided KryoCallback with a Kryo instance from the pool (borrow/release around KryoCallback.execute(Kryo)).
      Specified by:
      run in interface KryoPool
    • clear

      public void clear()