Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 576 for poll (0.15 sec)

  1. guava-testlib/src/com/google/common/collect/testing/testers/QueuePollTester.java

      public void testPoll_empty() {
        assertNull("emptyQueue.poll() should return null", getQueue().poll());
        expectUnchanged();
      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      @CollectionSize.Require(ONE)
      public void testPoll_size1() {
        assertEquals("size1Queue.poll() should return first element", e0(), getQueue().poll());
        expectMissing(e0());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java

          }
        }
      }
    
      /**
       * Implementation of the InvertedMinMaxPriorityQueue which forwards all calls to a
       * MinMaxPriorityQueue, except poll, which is forwarded to pollMax. That way we can benchmark
       * pollMax using the same code that benchmarks poll.
       */
      static final class InvertedMinMaxPriorityQueue<T> extends ForwardingQueue<T> {
        MinMaxPriorityQueue<T> mmHeap;
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ForwardingQueue.java

      public boolean offer(@ParametricNullness E o) {
        return delegate().offer(o);
      }
    
      @CanIgnoreReturnValue // TODO(cpovirk): Consider removing this?
      @Override
      @CheckForNull
      public E poll() {
        return delegate().poll();
      }
    
      @CanIgnoreReturnValue
      @Override
      @ParametricNullness
      public E remove() {
        return delegate().remove();
      }
    
      @Override
      @CheckForNull
      public E peek() {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 29 19:42:21 GMT 2021
    - 4.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/SynchronizedQueueTest.java

        @Override
        public boolean offer(E o) {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.offer(o);
        }
    
        @Override
        public @Nullable E poll() {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.poll();
        }
    
        @Override
        public E remove() {
          assertTrue(Thread.holdsLock(mutex));
          return delegate.remove();
        }
    
        @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Queues.java

        while (added < numElements) {
          // we could rely solely on #poll, but #drainTo might be more efficient when there are multiple
          // elements already available (e.g. LinkedBlockingQueue#drainTo locks only once)
          added += q.drainTo(buffer, numElements - added);
          if (added < numElements) { // not enough elements immediately available; will have to poll
            E e = q.poll(deadline - System.nanoTime(), TimeUnit.NANOSECONDS);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 16K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/testers/QueuePollTester.java

      public void testPoll_empty() {
        assertNull("emptyQueue.poll() should return null", getQueue().poll());
        expectUnchanged();
      }
    
      @CollectionFeature.Require(SUPPORTS_REMOVE)
      @CollectionSize.Require(ONE)
      public void testPoll_size1() {
        assertEquals("size1Queue.poll() should return first element", e0(), getQueue().poll());
        expectMissing(e0());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/ForwardingBlockingDeque.java

      }
    
      @Override
      public E take() throws InterruptedException {
        return delegate().take();
      }
    
      @Override
      @CheckForNull
      public E poll(long timeout, TimeUnit unit) throws InterruptedException {
        return delegate().poll(timeout, unit);
      }
    
      @Override
      public int drainTo(Collection<? super E> c) {
        return delegate().drainTo(c);
      }
    
      @Override
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Mar 13 14:30:51 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java

          }
        }
      }
    
      /**
       * Implementation of the InvertedMinMaxPriorityQueue which forwards all calls to a
       * MinMaxPriorityQueue, except poll, which is forwarded to pollMax. That way we can benchmark
       * pollMax using the same code that benchmarks poll.
       */
      static final class InvertedMinMaxPriorityQueue<T> extends ForwardingQueue<T> {
        MinMaxPriorityQueue<T> mmHeap;
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/ForwardingBlockingQueue.java

        return delegate().offer(e, timeout, unit);
      }
    
      @CanIgnoreReturnValue // TODO(kak): consider removing this
      @Override
      @CheckForNull
      public E poll(long timeout, TimeUnit unit) throws InterruptedException {
        return delegate().poll(timeout, unit);
      }
    
      @Override
      public void put(E e) throws InterruptedException {
        delegate().put(e);
      }
    
      @Override
      public int remainingCapacity() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 3K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/crypto/CachedCipher.java

            } catch (final UnsupportedEncodingException e) {
                throw new UnsupportedEncodingRuntimeException(e);
            }
        }
    
        protected Cipher pollEncryptoCipher() {
            Cipher cipher = encryptoQueue.poll();
            if (cipher == null) {
                final SecretKeySpec sksSpec = new SecretKeySpec(key.getBytes(), algorithm);
                try {
                    cipher = Cipher.getInstance(algorithm);
    Java
    - Registered: Fri Apr 12 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 8.1K bytes
    - Viewed (0)
Back to top