Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for isHealthy (0.19 sec)

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

        manager.addListener(listener, directExecutor());
        assertState(manager, Service.State.NEW, a, b);
        assertFalse(manager.isHealthy());
        manager.startAsync().awaitHealthy();
        assertState(manager, Service.State.RUNNING, a, b);
        assertTrue(manager.isHealthy());
        assertTrue(listener.healthyCalled);
        assertFalse(listener.stoppedCalled);
        assertTrue(listener.failedServices.isEmpty());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        }
    
        val http2Connection = this.http2Connection
        if (http2Connection != null) {
          return http2Connection.isHealthy(nowNs)
        }
    
        val idleDurationNs = lock.withLock { nowNs - idleAtNs }
        if (idleDurationNs >= IDLE_CONNECTION_HEALTHY_NS && doExtensiveChecks) {
          return socket.isHealthy(source)
        }
    
        return true
      }
    
      /** Refuse incoming streams. */
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

        manager.addListener(listener, directExecutor());
        assertState(manager, Service.State.NEW, a, b);
        assertFalse(manager.isHealthy());
        manager.startAsync().awaitHealthy();
        assertState(manager, Service.State.RUNNING, a, b);
        assertTrue(manager.isHealthy());
        assertTrue(listener.healthyCalled);
        assertFalse(listener.stoppedCalled);
        assertTrue(listener.failedServices.isEmpty());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.9K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/UtilTest.kt

        val socket = Socket()
        socket.connect(serverSocket.localSocketAddress)
        val socketSource = socket.source().buffer()
    
        assertThat(socket.isHealthy(socketSource)).isTrue()
    
        serverSocket.close()
        assertThat(socket.isHealthy(socketSource)).isFalse()
      }
    
      @Test
      fun testDurationTimeUnit() {
        assertThat(checkDuration("timeout", 0, TimeUnit.MILLISECONDS)).isEqualTo(0)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/ServiceManager.java

      /**
       * Waits for the {@link ServiceManager} to become {@linkplain #isHealthy() healthy}. The manager
       * will become healthy after all the component services have reached the {@linkplain State#RUNNING
       * running} state.
       *
       * @throws IllegalStateException if the service manager reaches a state from which it cannot
       *     become {@linkplain #isHealthy() healthy}.
       */
      public void awaitHealthy() {
        state.awaitHealthy();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 30.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        // When the timeout is sent the connection doesn't immediately go unhealthy.
        assertThat(connection.isHealthy(System.nanoTime())).isTrue()
    
        // But if the ping doesn't arrive, the connection goes unhealthy.
        Thread.sleep(TimeUnit.NANOSECONDS.toMillis(Http2Connection.DEGRADED_PONG_TIMEOUT_NS.toLong()))
        assertThat(connection.isHealthy(System.nanoTime())).isFalse()
    
        // When a pong does arrive, the connection becomes healthy again.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

        // Make sure this connection is healthy & eligible for new exchanges. If it's no longer needed
        // then we're on the hook to close it.
        val healthy = candidate.isHealthy(connectionUser.doExtensiveHealthChecks())
        var noNewExchangesEvent = false
        val toClose: Socket? =
          candidate.withLock {
            when {
              !healthy -> {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

                  true
                }
              }
            }
          if (!acquired) continue
    
          // Confirm the connection is healthy and return it.
          if (connection.isHealthy(doExtensiveHealthChecks)) return connection
    
          // In the second synchronized block, release the unhealthy acquired connection. We're also on
          // the hook to close this connection if it's no longer in use.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

     * attempting to read with a short timeout. If the fails immediately we know the socket is
     * unhealthy.
     *
     * @param source the source used to read bytes from the socket.
     */
    internal fun Socket.isHealthy(source: BufferedSource): Boolean {
      return try {
        val readTimeout = soTimeout
        try {
          soTimeout = 1
          !source.exhausted()
        } finally {
          soTimeout = readTimeout
        }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

      private fun waitForConnectionShutdown(connection: RealConnection?) {
        if (connection!!.isHealthy(false)) {
          Thread.sleep(100L)
        }
        if (connection.isHealthy(false)) {
          Thread.sleep(2000L)
        }
        if (connection.isHealthy(false)) {
          throw TimeoutException("connection didn't shutdown within timeout")
        }
      }
    
      /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
Back to top