Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for CountDownLatch (0.05 sec)

  1. src/test/java/org/codelibs/fess/suggest/concurrent/DeferredTest.java

                } catch (InterruptedException ignore) {}
                deferred.resolve(new SuggestResponse("", 0, Collections.emptyList(), 0, null));
            });
            th.start();
    
            final CountDownLatch latch = new CountDownLatch(1);
            deferred.promise().then(response -> latch.countDown());
            assertTrue(latch.await(10, TimeUnit.SECONDS));
        }
    
        @Test
        public void test_doneAfterResolve() throws Exception {
    Registered: Fri Sep 19 09:08:11 UTC 2025
    - Last Modified: Sat Mar 15 06:51:20 UTC 2025
    - 4.8K bytes
    - Viewed (0)
  2. fess-crawler/src/test/java/org/codelibs/fess/crawler/rule/RuleManagerTest.java

            final ThreadSafeRuleManager threadSafeManager = new ThreadSafeRuleManager();
            final int threadCount = 10;
            final int rulesPerThread = 100;
            final CountDownLatch startLatch = new CountDownLatch(1);
            final CountDownLatch endLatch = new CountDownLatch(threadCount);
    
            for (int i = 0; i < threadCount; i++) {
                final int threadId = i;
                new Thread(new Runnable() {
                    @Override
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Sat Sep 06 04:15:37 UTC 2025
    - 23.8K bytes
    - Viewed (0)
  3. fess-crawler/src/test/java/org/codelibs/fess/crawler/CrawlerContextTest.java

         */
        public void test_accessCount_concurrent() throws Exception {
            final int threadCount = 100;
            final int operationsPerThread = 1000;
            final CountDownLatch startLatch = new CountDownLatch(1);
            final CountDownLatch endLatch = new CountDownLatch(threadCount);
    
            ExecutorService executor = Executors.newFixedThreadPool(threadCount);
    
            for (int i = 0; i < threadCount; i++) {
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Sat Sep 06 04:15:37 UTC 2025
    - 25.6K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/suggest/concurrent/Deferred.java

     *   for successful and unsuccessful computations, respectively.
     * </p>
     *
     * <p>
     *   The Deferred class uses a CountDownLatch to allow you to wait for the computation to complete.
     *   The resolve and reject methods decrement the CountDownLatch, allowing the getResponse method
     *   to return the result of the computation.
     * </p>
     *
     * @param <RESPONSE> The type of the response.
     */
    Registered: Fri Sep 19 09:08:11 UTC 2025
    - Last Modified: Fri Jul 04 14:00:23 UTC 2025
    - 7.8K bytes
    - Viewed (0)
  5. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/AbstractTransformerTest.java

         */
        public void test_concurrentNameAccess() throws Exception {
            final int threadCount = 100;
            final int operationsPerThread = 100;
            final CountDownLatch startLatch = new CountDownLatch(1);
            final CountDownLatch endLatch = new CountDownLatch(threadCount);
            final AtomicInteger errorCount = new AtomicInteger(0);
    
            testTransformer.setName("concurrentName");
    
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Sat Sep 06 04:15:37 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  6. fess-crawler/src/test/java/org/codelibs/fess/crawler/rule/impl/AbstractRuleTest.java

         */
        public void test_concurrentPropertyAccess() throws Exception {
            final int threadCount = 10;
            final int iterationsPerThread = 100;
            final CountDownLatch startLatch = new CountDownLatch(1);
            final CountDownLatch endLatch = new CountDownLatch(threadCount);
            final AtomicInteger errorCount = new AtomicInteger(0);
    
            // Set initial values
            testRule.setRuleId("concurrentRule");
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Wed Sep 03 14:42:53 UTC 2025
    - 21.9K bytes
    - Viewed (0)
  7. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/TransformerTest.java

            final int threadCount = 5;
            final int operationsPerThread = 10;
            final CountDownLatch startLatch = new CountDownLatch(1);
            final CountDownLatch endLatch = new CountDownLatch(threadCount);
            final AtomicInteger successCount = new AtomicInteger(0);
    
            ExecutorService executor = Executors.newFixedThreadPool(threadCount);
    
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Sat Sep 06 04:15:37 UTC 2025
    - 28K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/fess/suggest/SuggesterTest.java

                bulkRequestBuilder.add(indexRequestBuilder);
            }
            bulkRequestBuilder.execute().actionGet();
            runner.refresh();
    
            CountDownLatch latch = new CountDownLatch(1);
            AtomicInteger numObInputDoc = new AtomicInteger(0);
            ESSourceReader reader = new ESSourceReader(client, suggester.settings(), indexName);
            reader.setScrollSize(1000);
    
    Registered: Fri Sep 19 09:08:11 UTC 2025
    - Last Modified: Thu Aug 07 02:41:28 UTC 2025
    - 37.2K bytes
    - Viewed (0)
Back to top