Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for threshold (0.18 sec)

  1. android/guava/src/com/google/common/util/concurrent/OverflowAvoidingLockSupport.java

     */
    @J2ktIncompatible
    @ElementTypesAreNonnullByDefault
    final class OverflowAvoidingLockSupport {
      // Represents the max nanoseconds representable on a linux timespec with a 32 bit tv_sec
      static final long MAX_NANOSECONDS_THRESHOLD = (1L + Integer.MAX_VALUE) * 1_000_000_000L - 1L;
    
      private OverflowAvoidingLockSupport() {}
    
      static void parkNanos(@CheckForNull Object blocker, long nanos) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/TopKSelector.java

          // uncheckedCastNullableTToT is safe because bufferSize > 0.
          if (comparator.compare(elem, uncheckedCastNullableTToT(threshold)) > 0) {
            threshold = elem;
          }
          // uncheckedCastNullableTToT is safe because bufferSize > 0.
        } else if (comparator.compare(elem, uncheckedCastNullableTToT(threshold)) < 0) {
          // Otherwise, we can ignore elem; we've seen k better elements.
          buffer[bufferSize++] = elem;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/FileBackedOutputStream.java

      @VisibleForTesting
      @CheckForNull
      synchronized File getFile() {
        return file;
      }
    
      /**
       * Creates a new instance that uses the given file threshold, and does not reset the data when the
       * {@link ByteSource} returned by {@link #asByteSource} is finalized.
       *
       * @param fileThreshold the number of bytes before the stream should switch to buffering to a file
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/curl/io/ContentOutputStream.java

        protected static final String PREFIX = "curl4j-";
    
        protected static final String SUFFIX = ".tmp";
    
        protected boolean done = false;
    
        public ContentOutputStream(final int threshold, final File tmpDir) {
            super(threshold, PREFIX, SUFFIX, tmpDir);
        }
    
        @Override
        public File getFile() {
            done = true;
            return super.getFile();
        }
    
        @Override
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

        int chunk2 = dataSize - chunk1;
    
        // Write just enough to not trip the threshold
        if (chunk1 > 0) {
          write(out, data, 0, chunk1, singleByte);
          assertTrue(ByteSource.wrap(data).slice(0, chunk1).contentEquals(source));
        }
        File file = out.getFile();
        assertNull(file);
    
        // Write data to go over the threshold
        if (chunk2 > 0) {
          if (JAVA_IO_TMPDIR.value().equals("/sdcard")) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/curl/CurlRequest.java

                throw new CurlException("This method must be called before param method.");
            }
            this.encoding = encoding;
            return this;
        }
    
        public CurlRequest threshold(final int threshold) {
            this.threshold = threshold;
            return this;
        }
    
        public CurlRequest gzip() {
            return compression(GZIP);
        }
    
        public CurlRequest compression(final String compression) {
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Sun Feb 12 12:21:25 GMT 2023
    - 12.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

        int chunk2 = dataSize - chunk1;
    
        // Write just enough to not trip the threshold
        if (chunk1 > 0) {
          write(out, data, 0, chunk1, singleByte);
          assertTrue(ByteSource.wrap(data).slice(0, chunk1).contentEquals(source));
        }
        File file = out.getFile();
        assertNull(file);
    
        // Write data to go over the threshold
        if (chunk2 > 0) {
          if (JAVA_IO_TMPDIR.value().equals("/sdcard")) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/curl/io/IOIntegrationTest.java

        }
    
        @Test
        public void test_TmpFileHasBeenDeletedAfterResponseWasClosed() throws Exception {
            // ## Arrange ##
            CurlRequest req = new MockCurlRequest(Curl.Method.POST, "http://dummy");
            req.threshold(0); // always create tmp file
    
            // ## Act ##
            long before = countTmpFiles();
            logger.info("Before request. Number of temp files: " + before);
            req.execute(res -> {
    Java
    - Registered: Thu May 09 15:34:10 GMT 2024
    - Last Modified: Mon Nov 14 21:05:19 GMT 2022
    - 3.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/MapMakerInternalMap.java

       * ordering information is updated. This is used to avoid lock contention by recording a memento
       * of reads and delaying a lock acquisition until the threshold is crossed or a mutation occurs.
       *
       * <p>This must be a (2^n)-1 as it is used as a mask.
       */
      static final int DRAIN_THRESHOLD = 0x3F;
    
      /**
       * Maximum number of entries to be drained in a single cleanup run. This applies independently to
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 91.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ObjectCountHashMap.java

       */
      @VisibleForTesting transient long[] entries;
    
      /** The load factor. */
      private transient float loadFactor;
    
      /** When we have this many elements, resize the hashtable. */
      private transient int threshold;
    
      /** Constructs a new empty instance of {@code ObjectCountHashMap}. */
      ObjectCountHashMap() {
        init(DEFAULT_SIZE, DEFAULT_LOAD_FACTOR);
      }
    
      ObjectCountHashMap(ObjectCountHashMap<? extends K> map) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 01 22:07:10 GMT 2021
    - 15K bytes
    - Viewed (0)
Back to top