@Test public void testRecycle() { Recycler<HandledObject> recycler = newRecycler(1024); HandledObject object = recycler.get(); object.recycle(); HandledObject object2 = recycler.get(); assertSame(object, object2); object2.recycle(); }
@Deprecated public final boolean recycle(T o, Handle<T> handle) { if (handle == NOOP_HANDLE) { return false; } DefaultHandle<T> h = (DefaultHandle<T>) handle; if (h.stack.parent != this) { return false; } h.recycle(o); return true; }
Recycler { @Deprecated public final boolean recycle(T o, Handle<T> handle) { if (handle == NOOP_HANDLE) { return false; } DefaultHandle<T> h = (DefaultHandle<T>) handle; if (h.stack.parent != this) { return false; } h.recycle(o); return true; } }
Recycler { @Deprecated public final boolean recycle(T o, Handle<T> handle) { if (handle == NOOP_HANDLE) { return false; } DefaultHandle<T> h = (DefaultHandle<T>) handle; if (h.stack.parent != this) { return false; } h.recycle(o); return true; } protected  Recycler(); protected  Recycler(int maxCapacityPerThread); protected  Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor); protected  Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor,
                       int ratio, int maxDelayedQueuesPerThread); }
Recycler { @Deprecated public final boolean recycle(T o, Handle<T> handle) { if (handle == NOOP_HANDLE) { return false; } DefaultHandle<T> h = (DefaultHandle<T>) handle; if (h.stack.parent != this) { return false; } h.recycle(o); return true; } protected  Recycler(); protected  Recycler(int maxCapacityPerThread); protected  Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor); protected  Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor,
                       int ratio, int maxDelayedQueuesPerThread); @SuppressWarnings("unchecked") final T get(); @Deprecated final boolean recycle(T o, Handle<T> handle); }
Recycler { @Deprecated public final boolean recycle(T o, Handle<T> handle) { if (handle == NOOP_HANDLE) { return false; } DefaultHandle<T> h = (DefaultHandle<T>) handle; if (h.stack.parent != this) { return false; } h.recycle(o); return true; } protected  Recycler(); protected  Recycler(int maxCapacityPerThread); protected  Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor); protected  Recycler(int maxCapacityPerThread, int maxSharedCapacityFactor,
                       int ratio, int maxDelayedQueuesPerThread); @SuppressWarnings("unchecked") final T get(); @Deprecated final boolean recycle(T o, Handle<T> handle);  }