Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for IsClosed (2.91 sec)

  1. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

        assertThat(c1.socket().isClosed).isFalse()
        assertThat(c2.socket().isClosed).isFalse()
    
        // Add a third connection
        val c3 = factory.newConnection(pool, routeC1, 75L)
    
        // The third connection bounces the first.
        assertThat(pool.closeConnections(100L)).isEqualTo(0L)
        assertThat(pool.connectionCount()).isEqualTo(2)
        assertThat(c1.socket().isClosed).isTrue()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/CloserTest.java

        TestCloseable c3 = closer.register(TestCloseable.normal());
    
        assertFalse(c1.isClosed());
        assertFalse(c2.isClosed());
        assertFalse(c3.isClosed());
    
        closer.close();
    
        assertTrue(c1.isClosed());
        assertTrue(c2.isClosed());
        assertTrue(c3.isClosed());
    
        assertTrue(suppressor.suppressions.isEmpty());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/CloserTest.java

        TestCloseable c3 = closer.register(TestCloseable.normal());
    
        assertFalse(c1.isClosed());
        assertFalse(c2.isClosed());
        assertFalse(c3.isClosed());
    
        closer.close();
    
        assertTrue(c1.isClosed());
        assertTrue(c2.isClosed());
        assertTrue(c3.isClosed());
    
        assertTrue(suppressor.suppressions.isEmpty());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        lock.assertNotHeld()
    
        val nowNs = System.nanoTime()
    
        val rawSocket = this.rawSocket!!
        val socket = this.socket!!
        val source = this.source!!
        if (rawSocket.isClosed || socket.isClosed || socket.isInputShutdown ||
          socket.isOutputShutdown
        ) {
          return false
        }
    
        val http2Connection = this.http2Connection
        if (http2Connection != null) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/Cache.kt

      internal var writeSuccessCount = 0
      internal var writeAbortCount = 0
      private var networkCount = 0
      private var hitCount = 0
      private var requestCount = 0
    
      val isClosed: Boolean
        get() = cache.isClosed()
    
      internal fun get(request: Request): Response? {
        val key = key(request.url)
        val snapshot: DiskLruCache.Snapshot =
          try {
            cache[key] ?: return null
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

       * trailers. Undefined until the end of the response body.
       */
      private var trailers: Headers? = null
    
      /** Returns true if this connection is closed. */
      val isClosed: Boolean
        get() = state == STATE_CLOSED
    
      override fun createRequestBody(
        request: Request,
        contentLength: Long,
      ): Sink {
        return when {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

       * resources are released and all following calls to [.newSource] return null. Guarded by this.
       */
      var sourceCount = 0
    
      val isClosed: Boolean
        get() = file == null
    
      @Throws(IOException::class)
      private fun writeHeader(
        prefix: ByteString,
        upstreamSize: Long,
        metadataSize: Long,
      ) {
        val header =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  8. guava/src/com/google/common/base/FinalizableReferenceQueue.java

     *     Reference<?> reference = new FinalizablePhantomReference<MyServer>(myServer, frq) {
     *       public void finalizeReferent() {
     *         references.remove(this):
     *         if (!serverSocket.isClosed()) {
     *           ...log a message about how nobody called close()...
     *           try {
     *             serverSocket.close();
     *           } catch (IOException e) {
     *             ...
     *           }
     *         }
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/FinalizableReferenceQueue.java

     *     Reference<?> reference = new FinalizablePhantomReference<MyServer>(myServer, frq) {
     *       public void finalizeReferent() {
     *         references.remove(this):
     *         if (!serverSocket.isClosed()) {
     *           ...log a message about how nobody called close()...
     *           try {
     *             serverSocket.close();
     *           } catch (IOException e) {
     *             ...
     *           }
     *         }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

      @Synchronized
      @Throws(IOException::class)
      override fun flush() {
        if (!initialized) return
    
        checkNotClosed()
        trimToSize()
        journalWriter!!.flush()
      }
    
      @Synchronized fun isClosed(): Boolean = closed
    
      /** Closes this cache. Stored values will remain on the filesystem. */
      @Synchronized
      @Throws(IOException::class)
      override fun close() {
        if (!initialized || closed) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
Back to top