|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.util.FreeRingDual<T>
public final class FreeRingDual<T>
A free list with soft references.
Constructor Summary | |
---|---|
FreeRingDual(int capacity,
int softCapacity)
Create a new free list. |
Method Summary | |
---|---|
T |
allocate()
Try to get an object from the free list. |
boolean |
checkDuplicate(T obj)
Debugging to see if the object has already been freed. |
boolean |
free(T value)
Frees the object. |
boolean |
freeCareful(T value)
Frees the object. |
long |
getHead()
|
long |
getHeadAlloc()
|
int |
getSize()
|
long |
getTail()
|
long |
getTailAlloc()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FreeRingDual(int capacity, int softCapacity)
initialSize
- maximum number of free objects to store.Method Detail |
---|
public int getSize()
public long getHead()
public long getHeadAlloc()
public long getTail()
public long getTailAlloc()
public T allocate()
public boolean free(T value)
obj
- the object to be freed.public boolean freeCareful(T value)
obj
- the object to be freed.public boolean checkDuplicate(T obj)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |