Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for enqueue (0.19 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

        ListenerCallQueue<Object> queue = new ListenerCallQueue<>();
        queue.addListener(listener, directExecutor());
    
        Multiset<Object> counters = ConcurrentHashMultiset.create();
        queue.enqueue(incrementingEvent(counters, listener, 1));
        queue.enqueue(THROWING_EVENT);
        queue.enqueue(incrementingEvent(counters, listener, 2));
        queue.enqueue(THROWING_EVENT);
        queue.enqueue(incrementingEvent(counters, listener, 3));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

        ListenerCallQueue<Object> queue = new ListenerCallQueue<>();
        queue.addListener(listener, directExecutor());
    
        Multiset<Object> counters = ConcurrentHashMultiset.create();
        queue.enqueue(incrementingEvent(counters, listener, 1));
        queue.enqueue(THROWING_EVENT);
        queue.enqueue(incrementingEvent(counters, listener, 2));
        queue.enqueue(THROWING_EVENT);
        queue.enqueue(incrementingEvent(counters, listener, 3));
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/ListenerCallQueue.java

       */
      public void enqueue(Event<L> event) {
        enqueueHelper(event, event);
      }
    
      /**
       * Enqueues an event to be run on currently known listeners, with a label.
       *
       * @param event the callback to execute on {@link #dispatch}
       * @param label a description of the event to use in the case of an error
       */
      public void enqueue(Event<L> event, String label) {
        enqueueHelper(event, label);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 8.2K bytes
    - Viewed (0)
  4. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java

        MockWebServer server = new MockWebServer();
        server.setServerSocketFactory(new UnixDomainServerSocketFactory(socketFile));
        server.setProtocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE));
        server.enqueue(new MockResponse().setBody("hello"));
        server.start();
    
        OkHttpClient client = new OkHttpClient.Builder()
            .socketFactory(new UnixDomainSocketFactory(socketFile))
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Dec 24 03:46:30 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java

          .build();
    
      public void run() throws Exception {
        Request washingtonPostRequest = new Request.Builder()
            .url("https://www.washingtonpost.com/")
            .build();
        client.newCall(washingtonPostRequest).enqueue(new Callback() {
          @Override public void onFailure(Call call, IOException e) {
          }
    
          @Override public void onResponse(Call call, Response response) throws IOException {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 16 23:20:49 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/HttpsServer.java

            .heldCertificate(localhostCertificate)
            .build();
        MockWebServer server = new MockWebServer();
        server.useHttps(serverCertificates.sslSocketFactory(), false);
        server.enqueue(new MockResponse());
    
        HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder()
            .addTrustedCertificate(localhostCertificate.certificate())
            .build();
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 02 14:04:37 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/AsynchronousGet.java

      public void run() throws Exception {
        Request request = new Request.Builder()
            .url("http://publicobject.com/helloworld.txt")
            .build();
    
        client.newCall(request).enqueue(new Callback() {
          @Override public void onFailure(Call call, IOException e) {
            e.printStackTrace();
          }
    
          @Override public void onResponse(Call call, Response response) throws IOException {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.9K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/testers/AbstractQueueTester.java

    import java.util.Queue;
    import org.junit.Ignore;
    
    /**
     * Base class for queue collection tests.
     *
     * @author Jared Levy
     */
    @GwtCompatible
    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    public class AbstractQueueTester<E> extends AbstractCollectionTester<E> {
      protected final Queue<E> getQueue() {
        return (Queue<E>) collection;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 1.1K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/testers/AbstractQueueTester.java

    import java.util.Queue;
    import org.junit.Ignore;
    
    /**
     * Base class for queue collection tests.
     *
     * @author Jared Levy
     */
    @GwtCompatible
    @Ignore // Affects only Android test runner, which respects JUnit 4 annotations on JUnit 3 tests.
    public class AbstractQueueTester<E> extends AbstractCollectionTester<E> {
      protected final Queue<E> getQueue() {
        return (Queue<E>) collection;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 1.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java

      @Nullable FinalizableWeakReference<Object> reference;
    
      /** Create the FRQ in a method that goes out of scope so that we're sure it will be reclaimed. */
      private void weaklyReferenceQueue() {
        frq = new FinalizableReferenceQueue();
        queueReference = new WeakReference<>(frq.queue);
    
        /*
         * Queue and clear a reference for good measure. We test later on that
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 10 08:40:05 GMT 2023
    - 4.8K bytes
    - Viewed (0)
Back to top