Class AbstractRecyclerC<T>

org.elasticsearch.common.recycler.AbstractRecyclerC<T>
All Implemented Interfaces:
Recycler.C<T>

public abstract class AbstractRecyclerC<T> extends implements Recycler.C<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    destroy​(T value)
    Destroy the data.
    abstract T
    Create a new empty instance of the given size.
    abstract void
    recycle​(T value)
    Recycle the data.

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

    • AbstractRecyclerC

      public AbstractRecyclerC()
  • Method Details

    • newInstance

      public abstract T newInstance()
      Description copied from interface: Recycler.C
      Create a new empty instance of the given size.
      Specified by:
      newInstance in interface Recycler.C<T>
    • recycle

      public abstract void recycle(T value)
      Description copied from interface: Recycler.C
      Recycle the data. This operation is called when the data structure is released.
      Specified by:
      recycle in interface Recycler.C<T>
    • destroy

      public void destroy(T value)
      Description copied from interface: Recycler.C
      Destroy the data. This operation allows the data structure to release any internal resources before GC.
      Specified by:
      destroy in interface Recycler.C<T>