Lines Matching defs:capacity

34  * <p>The optional capacity bound constructor argument serves as a
35 * way to prevent excessive queue expansion. The capacity, if unspecified,
38 * queue above capacity.
104 /** The capacity bound, or Integer.MAX_VALUE if none */
105 private final int capacity;
214 * Creates a {@code LinkedBlockingQueue} with a capacity of
222 * Creates a {@code LinkedBlockingQueue} with the given (fixed) capacity.
224 * @param capacity the capacity of this queue
225 * @throws IllegalArgumentException if {@code capacity} is not greater
228 public LinkedBlockingQueue(int capacity) {
229 if (capacity <= 0) throw new IllegalArgumentException();
230 this.capacity = capacity;
235 * Creates a {@code LinkedBlockingQueue} with a capacity of
253 if (n == capacity)
280 * blocking. This is always equal to the initial capacity of this queue
289 return capacity - count.get();
314 * signalled if it ever changes from capacity. Similarly
317 while (count.get() == capacity) {
322 if (c + 1 < capacity)
350 while (count.get() == capacity) {
357 if (c + 1 < capacity)
369 * possible to do so immediately without exceeding the queue's capacity,
372 * When using a capacity-restricted queue, this method is generally
381 if (count.get() == capacity)
388 if (count.get() < capacity) {
391 if (c + 1 < capacity)
419 if (c == capacity)
444 if (c == capacity)
467 if (c == capacity)
499 if (count.getAndDecrement() == capacity)
670 if (count.getAndSet(0) == capacity)
723 signalNotFull = (count.getAndAdd(-i) == capacity);
833 * @serialData The capacity is emitted (int), followed by all of
842 // Write out any hidden stuff, plus capacity
861 // Read in capacity, and any hidden stuff