Пример #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);
 }
Пример #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();
 }
Пример #3
0
 public long getHeadAlloc() {
   return _ringQueue.getHeadAlloc();
 }
Пример #4
0
 public long getTailAlloc() {
   return _ringQueue.getTailAlloc();
 }
Пример #5
0
 public int getSize() {
   return _ringQueue.getSize();
 }