/** * Frees the object. If the free list is full, the object will be garbage collected. * * @param obj the object to be freed. */ public boolean free(T value) { return _ringQueue.offer(value); }
/** * Try to get an object from the free list. Returns null if the free list is empty. * * @return the new object or null. */ public T allocate() { return _ringQueue.poll(); }
public long getHeadAlloc() { return _ringQueue.getHeadAlloc(); }
public long getTailAlloc() { return _ringQueue.getTailAlloc(); }
public int getSize() { return _ringQueue.getSize(); }