Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for IsClosed (0.26 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. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

        val source2 = relay.newSource()
        source1!!.close()
        source1.close() // Unnecessary. Shouldn't decrement the reference count.
        assertThat(relay.isClosed).isFalse()
        source2!!.close()
        assertThat(relay.isClosed).isTrue()
        assertFile(Relay.PREFIX_DIRTY, -1L, -1, null, null)
      }
    
      @Test
      fun racingReaders() {
        val pipe = Pipe(1024)
        val sink = pipe.sink.buffer()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  4. 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)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocket.kt

      }
    
      override fun isBound(): Boolean {
        return delegate!!.isBound
      }
    
      override fun isConnected(): Boolean {
        return delegate!!.isConnected
      }
    
      override fun isClosed(): Boolean {
        return delegate!!.isClosed
      }
    
      @Throws(IOException::class)
      override fun bind(localAddr: SocketAddress) {
        delegate!!.bind(localAddr)
      }
    
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

      @ArgumentsSource(FileSystemParamProvider::class)
      fun isClosed_uninitializedCache(parameters: Pair<FileSystem, Boolean>) {
        setUp(parameters.first, parameters.second)
        // Create an uninitialized cache.
        cache =
          DiskLruCache(filesystem, cacheDir, appVersion, 2, Int.MAX_VALUE.toLong(), taskRunner).also {
            toClose.add(it)
          }
        assertThat(cache.isClosed()).isFalse()
        cache.close()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
Back to top