Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 4 of 4 for remainingCapacity (0.1 seconds)

  1. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

       *
       * <p>Note that you cannot always tell if an attempt to insert an element will succeed by
       * inspecting {@code remainingCapacity} because it may be the case that another thread is about to
       * insert or remove an element.
       */
      @CanIgnoreReturnValue
      @Override
      public int remainingCapacity() {
        Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return items.length - count;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 21:06:42 GMT 2026
    - 22.4K bytes
    - Click Count (0)
  2. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

       *
       * <p>Note that you cannot always tell if an attempt to insert an element will succeed by
       * inspecting {@code remainingCapacity} because it may be the case that another thread is about to
       * insert or remove an element.
       */
      @CanIgnoreReturnValue
      @Override
      public int remainingCapacity() {
        Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return items.length - count;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 21:06:42 GMT 2026
    - 22.4K bytes
    - Click Count (0)
  3. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

       * not capacity constrained.
       *
       * @return {@code Integer.MAX_VALUE}
       */
      @CanIgnoreReturnValue // pushed down from class to method
      @Override
      public int remainingCapacity() {
        return Integer.MAX_VALUE;
      }
    
      /**
       * Removes a single instance of the specified element from this queue, if it is present. More
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 21:06:42 GMT 2026
    - 19K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/collect/EvictingQueueTest.java

        assertEquals(3, queue.remainingCapacity());
        queue.add("hi");
        assertEquals(2, queue.remainingCapacity());
        queue.add("hi");
        assertEquals(1, queue.remainingCapacity());
        queue.add("hi");
        assertEquals(0, queue.remainingCapacity());
      }
    
      public void testEvictingAfterOne() throws Exception {
        EvictingQueue<String> queue = EvictingQueue.create(1);
        assertEquals(0, queue.size());
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 6.9K bytes
    - Click Count (0)
Back to Top