Class MarshalerContext.Pool<T>

  • Enclosing class:
    MarshalerContext

    private static class MarshalerContext.Pool<T>
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.function.Consumer<T> clean  
      private java.util.function.Supplier<T> factory  
      private int index  
      private java.util.List<T> pool  
    • Constructor Summary

      Constructors 
      Constructor Description
      Pool​(java.util.function.Supplier<T> factory, java.util.function.Consumer<T> clean)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) T get()  
      (package private) void reset()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • pool

        private final java.util.List<T> pool
      • index

        private int index
      • factory

        private final java.util.function.Supplier<T> factory
      • clean

        private final java.util.function.Consumer<T> clean
    • Constructor Detail

      • Pool

        Pool​(java.util.function.Supplier<T> factory,
             java.util.function.Consumer<T> clean)
    • Method Detail

      • get

        T get()
      • reset

        void reset()