Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 /**
  * 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();
 }
Exemplo n.º 3
0
 public long getHeadAlloc() {
   return _ringQueue.getHeadAlloc();
 }
Exemplo n.º 4
0
 public long getTailAlloc() {
   return _ringQueue.getTailAlloc();
 }
Exemplo n.º 5
0
 public int getSize() {
   return _ringQueue.getSize();
 }