Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for isHealthy (0.23 sec)

  1. src/main/java/jcifs/smb/MultiChannelManager.java

            }
    
            public void decrementConnections() {
                activeConnections.decrementAndGet();
            }
    
            public boolean isHealthy() {
                return isHealthy;
            }
    
            public void setHealthy(boolean healthy) {
                this.isHealthy = healthy;
                this.lastHealthCheck = System.currentTimeMillis();
            }
    
            public long getLastHealthCheck() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 20.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/multichannel/ChannelInfoTest.java

            assertFalse(channelInfo.isHealthy());
    
            channelInfo.setState(ChannelState.ESTABLISHED);
            assertEquals(ChannelState.ESTABLISHED, channelInfo.getState());
            assertTrue(channelInfo.isHealthy());
    
            channelInfo.setState(ChannelState.ACTIVE);
            assertTrue(channelInfo.isHealthy());
    
            channelInfo.setState(ChannelState.FAILED);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 11:13:46 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnection.kt

        }
    
        val http2Connection = this.http2Connection
        if (http2Connection != null) {
          return http2Connection.isHealthy(nowNs)
        }
    
        val idleDurationNs = withLock { nowNs - idleAtNs }
        if (idleDurationNs >= IDLE_CONNECTION_HEALTHY_NS && doExtensiveChecks) {
          return javaNetSocket.isHealthy(socket.source)
        }
    
        return true
      }
    
      /** Refuse incoming streams. */
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 14.9K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb2/multichannel/MultiChannelIntegrationTest.java

            assertEquals(localNic, channel.getLocalInterface());
            assertEquals(remoteNic, channel.getRemoteInterface());
            assertEquals(ChannelState.ESTABLISHED, channel.getState());
            assertTrue(channel.isHealthy());
    
            // Test metrics
            channel.incrementRequestsSent();
            channel.addBytesSent(1024);
            channel.updateActivity();
    
            assertEquals(1, channel.getRequestsSent());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 11:13:46 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  5. src/main/java/jcifs/internal/smb2/multichannel/ChannelInfo.java

            return System.currentTimeMillis() - lastActivityTime;
        }
    
        /**
         * Check if channel is in healthy state
         *
         * @return true if healthy
         */
        public boolean isHealthy() {
            return state == ChannelState.ACTIVE || state == ChannelState.ESTABLISHED;
        }
    
        /**
         * Get channel binding hash
         *
         * @return binding hash bytes
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 11:13:46 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/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 =
      try {
        val readTimeout = soTimeout
        try {
          soTimeout = 1
          !source.exhausted()
        } finally {
          soTimeout = readTimeout
        }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 10.2K bytes
    - Viewed (1)
  7. okhttp/src/jvmTest/kotlin/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.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 75.5K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/smb2/multichannel/ChannelManager.java

         *
         * @return collection of healthy channels
         */
        public Collection<ChannelInfo> getHealthyChannels() {
            return channels.values()
                    .stream()
                    .filter(ChannelInfo::isHealthy)
                    .collect(ArrayList::new, (list, item) -> list.add(item), (list1, list2) -> list1.addAll(list2));
        }
    
        /**
         * Select a channel for the given message
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 11:13:46 UTC 2025
    - 20K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Connection.kt

          withLock {
            if (isShutdown) {
              throw ConnectionShutdownException()
            }
            okHttpSettings.merge(settings)
          }
          writer.settings(settings)
        }
      }
    
      fun isHealthy(nowNs: Long): Boolean {
        withLock {
          if (isShutdown) return false
    
          // A degraded pong is overdue.
          if (degradedPongsReceived < degradedPingsSent && nowNs >= degradedPongDeadlineNs) return false
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 31.8K bytes
    - Viewed (0)
  10. docs/smb3-features/03-multi-channel-design.md

            this.lastActivityTime = System.currentTimeMillis();
        }
        
        public long getIdleTime() {
            return System.currentTimeMillis() - lastActivityTime;
        }
        
        public boolean isHealthy() {
            return state == ChannelState.ACTIVE || state == ChannelState.ESTABLISHED;
        }
        
        public double getErrorRate() {
            long total = requestsSent.get();
            if (total == 0) return 0.0;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 39.6K bytes
    - Viewed (0)
Back to top