@Override public boolean isEmpty() { checkForComod(); return super.isEmpty(); }
if (!_pool.isEmpty() && !_allocationQueue.isEmpty()) { Latch<T> latch = _allocationQueue.removeFirst(); latch.setPair( _pool.removeFirst());
if (objectQueue.internalProcessingCount == 0 && objectQueue.activeCount == 0 && objectQueue.queue.isEmpty()) { _poolMap.remove(key); _poolList.remove(key);
/** * Inserts the specified element at the specified position in this list. * Shifts the element currently at that position (if any) and any subsequent * elements to the right (adds one to their indices). * * @param index index at which the specified element is to be inserted. * @param element element to be inserted. * * @throws ClassCastException if the class of the specified element * prevents it from being added to this list. * @throws IllegalArgumentException if some aspect of the specified * element prevents it from being added to this list. * @throws IndexOutOfBoundsException if the index is out of range * (index < 0 || index > size()). */ public void add(int index, E element) { if(index == _size) { add(element); } else { if(index < 0 || index > _size) { throw new IndexOutOfBoundsException(String.valueOf(index) + " < 0 or " + String.valueOf(index) + " > " + _size); } Listable<E> succ = (isEmpty() ? null : getListableAt(index)); Listable<E> pred = (null == succ ? null : succ.prev()); insertListable(pred,succ,element); } }
if (!pool.queue.isEmpty()) { allocationQueueIter.remove(); latch.setPair(
synchronized(this) { pool.decrementActiveCount(); if (pool.queue.isEmpty() && pool.activeCount == 0 && pool.internalProcessingCount == 0) {
synchronized(this) { pool.decrementActiveCount(); if (pool.queue.isEmpty() && pool.activeCount == 0 && pool.internalProcessingCount == 0) {
objectQueue.decrementInternalProcessingCount(); if (removeObject) { if (objectQueue.queue.isEmpty() && objectQueue.activeCount == 0 && objectQueue.internalProcessingCount == 0) {
assertOpen(); synchronized (this) { if(_pool.isEmpty()) { return;
@Override public boolean isEmpty() { checkForComod(); return super.isEmpty(); }
public boolean isEmpty() { checkForComod(); return super.isEmpty(); }
@Override public boolean isEmpty() { checkForComod(); return super.isEmpty(); }
public boolean isEmpty() { checkForComod(); return super.isEmpty(); }
if (!_pool.isEmpty() && !_allocationQueue.isEmpty()) { Latch<T> latch = _allocationQueue.removeFirst(); latch.setPair( _pool.removeFirst());
if (!_pool.isEmpty() && !_allocationQueue.isEmpty()) { Latch latch = (Latch) _allocationQueue.removeFirst(); latch.setPair((ObjectTimestampPair) _pool.removeFirst());
if (!_pool.isEmpty() && !_allocationQueue.isEmpty()) { Latch latch = (Latch) _allocationQueue.removeFirst(); latch.setPair((ObjectTimestampPair) _pool.removeFirst());
/** * Inserts the specified element at the specified position in this list. * Shifts the element currently at that position (if any) and any subsequent * elements to the right (adds one to their indices). * * @param index index at which the specified element is to be inserted. * @param element element to be inserted. * * @throws ClassCastException if the class of the specified element * prevents it from being added to this list. * @throws IllegalArgumentException if some aspect of the specified * element prevents it from being added to this list. * @throws IndexOutOfBoundsException if the index is out of range * (index < 0 || index > size()). */ public void add(int index, E element) { if(index == _size) { add(element); } else { if(index < 0 || index > _size) { throw new IndexOutOfBoundsException(String.valueOf(index) + " < 0 or " + String.valueOf(index) + " > " + _size); } Listable<E> succ = (isEmpty() ? null : getListableAt(index)); Listable<E> pred = (null == succ ? null : succ.prev()); insertListable(pred,succ,element); } }
/** * Inserts the specified element at the specified position in this list. * Shifts the element currently at that position (if any) and any subsequent * elements to the right (adds one to their indices). * * @param index index at which the specified element is to be inserted. * @param element element to be inserted. * * @throws ClassCastException if the class of the specified element * prevents it from being added to this list. * @throws IllegalArgumentException if some aspect of the specified * element prevents it from being added to this list. * @throws IndexOutOfBoundsException if the index is out of range * (index < 0 || index > size()). */ public void add(int index, Object element) { if(index == _size) { add(element); } else { if(index < 0 || index > _size) { throw new IndexOutOfBoundsException(String.valueOf(index) + " < 0 or " + String.valueOf(index) + " > " + _size); } Listable succ = (isEmpty() ? null : getListableAt(index)); Listable pred = (null == succ ? null : succ.prev()); insertListable(pred,succ,element); } }
/** * Inserts the specified element at the specified position in this list. * Shifts the element currently at that position (if any) and any subsequent * elements to the right (adds one to their indices). * * @param index index at which the specified element is to be inserted. * @param element element to be inserted. * * @throws ClassCastException if the class of the specified element * prevents it from being added to this list. * @throws IllegalArgumentException if some aspect of the specified * element prevents it from being added to this list. * @throws IndexOutOfBoundsException if the index is out of range * (index < 0 || index > size()). */ public void add(int index, Object element) { if(index == _size) { add(element); } else { if(index < 0 || index > _size) { throw new IndexOutOfBoundsException(String.valueOf(index) + " < 0 or " + String.valueOf(index) + " > " + _size); } Listable succ = (isEmpty() ? null : getListableAt(index)); Listable pred = (null == succ ? null : succ.prev()); insertListable(pred,succ,element); } }
/** * Inserts the specified element at the specified position in this list. * Shifts the element currently at that position (if any) and any subsequent * elements to the right (adds one to their indices). * * @param index index at which the specified element is to be inserted. * @param element element to be inserted. * * @throws ClassCastException if the class of the specified element * prevents it from being added to this list. * @throws IllegalArgumentException if some aspect of the specified * element prevents it from being added to this list. * @throws IndexOutOfBoundsException if the index is out of range * (index < 0 || index > size()). */ public void add(int index, E element) { if(index == _size) { add(element); } else { if(index < 0 || index > _size) { throw new IndexOutOfBoundsException(String.valueOf(index) + " < 0 or " + String.valueOf(index) + " > " + _size); } Listable<E> succ = (isEmpty() ? null : getListableAt(index)); Listable<E> pred = (null == succ ? null : succ.prev()); insertListable(pred,succ,element); } }