Class RecyclerPool.ThreadLocalPoolBase<P extends RecyclerPool.WithPool<P>>

  • All Implemented Interfaces:
    RecyclerPool<P>, java.io.Serializable
    Direct Known Subclasses:
    JsonRecyclerPools.ThreadLocalPool
    Enclosing interface:
    RecyclerPool<P extends RecyclerPool.WithPool<P>>

    public abstract static class RecyclerPool.ThreadLocalPoolBase<P extends RecyclerPool.WithPool<P>>
    extends java.lang.Object
    implements RecyclerPool<P>
    Default RecyclerPool implementation that uses ThreadLocal for recycling instances. Instances are stored using SoftReferences so that they may be Garbage Collected as needed by JVM.

    Note that this implementation may not work well on platforms where SoftReferences are not well supported (like Android), or on platforms where Threads are not long-living or reused (like Project Loom).

    See Also:
    Serialized Form