Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for initialize (0.2 sec)

  1. okhttp/src/main/kotlin/okhttp3/Cache.kt

       *
       * Note that if the application chooses to not call this method to initialize the cache. By
       * default, OkHttp will perform lazy initialization upon the first usage of the cache.
       */
      @Throws(IOException::class)
      fun initialize() {
        cache.initialize()
      }
    
      /**
       * Closes the cache and deletes all of its stored values. This will delete all files in the cache
    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)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

        this.journalFileBackup = directory / JOURNAL_FILE_BACKUP
      }
    
      @Synchronized
      @Throws(IOException::class)
      fun initialize() {
        this.assertThreadHoldsLock()
    
        if (initialized) {
          return // Already initialized.
        }
    
        // If a bkp file exists, use it instead.
        if (fileSystem.exists(journalFileBackup)) {
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

        }.apply {
          timeout(client.callTimeoutMillis.toLong(), MILLISECONDS)
        }
    
      private val executed = AtomicBoolean()
    
      // These properties are only accessed by the thread executing the call.
    
      /** Initialized in [callStart]. */
      private var callStackTrace: Any? = null
    
      /** Finds an exchange to send the next request and receive the next response. */
      private var exchangeFinder: ExchangeFinder? = null
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  4. okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

                parameters = ByteString.EMPTY,
              )
          }
        }
    
        private fun generateKeyPair(): KeyPair {
          return KeyPairGenerator.getInstance(keyAlgorithm).run {
            initialize(keySize, SecureRandom())
            generateKeyPair()
          }
        }
    
        companion object {
          private const val DEFAULT_DURATION_MILLIS = 1000L * 60 * 60 * 24 // 24 hours.
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.6K bytes
    - Viewed (1)
  5. docs/changelogs/changelog_2x.md

         <dependency>
           <groupId>com.squareup.okio</groupId>
           <artifactId>okio</artifactId>
           <version>1.6.0</version>
         </dependency>
         ```
    
     *  New: `Cache.initialize()`. Call this on a background thread to eagerly
        initialize the response cache.
     *  New: Fold `MockWebServerRule` into `MockWebServer`. This makes it easier to
        write JUnit tests with `MockWebServer`. The `MockWebServer` library now
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 26.6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        var authenticator: Authenticator = Authenticator { route, response -> TODO() }
      }
    
      @Test
      fun cache() {
        val cache = Cache(File("/cache/"), Integer.MAX_VALUE.toLong())
        cache.initialize()
        cache.delete()
        cache.evictAll()
        val urls: MutableIterator<String> = cache.urls()
        val writeAbortCount: Int = cache.writeAbortCount()
        val writeSuccessCount: Int = cache.writeSuccessCount()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

    ) : RoutePlanner.Plan, ExchangeCodec.Carrier {
      /** True if this connect was canceled; typically because it lost a race. */
      @Volatile private var canceled = false
    
      // These properties are initialized by connect() and never reassigned.
    
      /** The low-level TCP socket. */
      private var rawSocket: Socket? = null
    
      /**
       * The application layer socket. Either an [SSLSocket] layered over [rawSocket], or [rawSocket]
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/CipherSuite.kt

              return 0
            }
          }
    
        /**
         * Holds interned instances. This needs to be above the init() calls below so that it's
         * initialized by the time those parts of `<clinit>()` run. Guarded by CipherSuite.class.
         */
        private val INSTANCES = mutableMapOf<String, CipherSuite>()
    
        // Last updated 2016-07-03 using cipher suites from Android 24 and Java 9.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 39.9K bytes
    - Viewed (1)
  9. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

     * ensures the symbols remain available and with the expected parameter and return types.
     */
    @Suppress(
      "DEPRECATION_ERROR",
      "UNUSED_VALUE",
      "UNUSED_VARIABLE",
      "VARIABLE_WITH_REDUNDANT_INITIALIZER",
    )
    class KotlinDeprecationErrorTest {
      private val factory = TestValueFactory()
    
      @AfterEach
      fun tearDown() {
        factory.close()
      }
    
      @Test @Disabled
      fun address() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

      private fun createNewCacheWithSize(maxSize: Int) {
        cache =
          DiskLruCache(filesystem, cacheDir, appVersion, 2, maxSize.toLong(), taskRunner).also {
            toClose.add(it)
          }
        synchronized(cache) { cache.initialize() }
      }
    
      fun setUp(
        baseFilesystem: FileSystem,
        windows: Boolean,
      ) {
        this.cacheDir =
          if (baseFilesystem is FakeFileSystem) "/cache".toPath() else cacheDirFile.path.toPath()
    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