Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 192 for deferred (0.04 seconds)

  1. src/main/java/org/codelibs/fess/suggest/concurrent/Deferred.java

    import org.codelibs.fess.suggest.request.Response;
    
    /**
     * <p>
     *   Deferred is a class that represents a deferred computation.
     *   It is similar to a Promise in JavaScript.
     *   It allows you to register callbacks that will be executed when the computation is complete,
     *   either successfully (resolve) or with an error (reject).
     * </p>
     *
     * <p>
     *   The Deferred class has a Promise inner class that allows you to register callbacks
    Created: Fri Apr 17 09:08:13 GMT 2026
    - Last Modified: Fri Jul 04 14:00:23 GMT 2025
    - 7.8K bytes
    - Click Count (0)
  2. src/test/java/org/codelibs/fess/suggest/concurrent/DeferredTest.java

        @Test
        public void test_promiseChaining_returnsSamePromise() throws Exception {
            final Deferred<SuggestResponse> deferred = new Deferred<>();
    
            Deferred<SuggestResponse>.Promise promise1 = deferred.promise();
            Deferred<SuggestResponse>.Promise promise2 = promise1.then(response -> {});
            Deferred<SuggestResponse>.Promise promise3 = promise2.error(error -> {});
    
    Created: Fri Apr 17 09:08:13 GMT 2026
    - Last Modified: Sun Feb 01 12:48:24 GMT 2026
    - 21.1K bytes
    - Click Count (0)
  3. src/main/java/org/codelibs/fess/suggest/request/Request.java

         */
        public Deferred<T>.Promise execute(final Client client) {
            final String error = getValidationError();
            if (!Strings.isNullOrEmpty(error)) {
                throw new IllegalArgumentException(error);
            }
    
            final Deferred<T> deferred = new Deferred<>();
            try {
                processRequest(client, deferred);
            } catch (final Exception e) {
    Created: Fri Apr 17 09:08:13 GMT 2026
    - Last Modified: Sun Nov 23 11:21:40 GMT 2025
    - 2.3K bytes
    - Click Count (0)
  4. src/main/java/org/codelibs/fess/suggest/index/operations/ContentIndexingOperations.java

         * @return A Promise that will be resolved with the SuggestIndexResponse
         */
        public Deferred<SuggestIndexResponse>.Promise indexFromQueryLog(final ContentIndexingContext ctx, final QueryLogReader queryLogReader,
                final int docPerReq, final long requestInterval) {
            final Deferred<SuggestIndexResponse> deferred = new Deferred<>();
            threadPool.execute(() -> {
                final long start = System.currentTimeMillis();
    Created: Fri Apr 17 09:08:13 GMT 2026
    - Last Modified: Sat Mar 14 02:35:38 GMT 2026
    - 21.7K bytes
    - Click Count (0)
  5. src/test/java/jcifs/dcerpc/rpcTest.java

                // Create a real NdrBuffer mock that can handle the deferred field access
                // But only test the non-deferred parts to avoid field mocking issues
    
                // When: Trying to encode (may throw exception due to deferred buffer)
                // Then: Should at least call the basic encoding methods before hitting deferred
                assertThrows(Exception.class, () -> {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 20.5K bytes
    - Click Count (0)
  6. src/main/java/jcifs/smb1/dcerpc/ndr/NdrBuffer.java

            nb.index = idx;
            nb.deferred = deferred;
            return nb;
        }
    
        /**
         * Resets the buffer position to the start.
         */
        public void reset() {
            this.index = start;
            length = 0;
            deferred = this;
        }
    
        /**
         * Returns the current index position in the buffer.
         *
         * @return the current index
         */
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 10.4K bytes
    - Click Count (0)
  7. src/test/java/jcifs/dcerpc/msrpc/srvsvcTest.java

        @Mock
        private NdrBuffer mockDeferredBuffer;
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            // Set the deferred field directly since it's a public field, not a method
            mockNdrBuffer.deferred = mockDeferredBuffer;
            lenient().when(mockNdrBuffer.derive(anyInt())).thenReturn(mockDeferredBuffer);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 12K bytes
    - Click Count (0)
  8. src/main/java/org/codelibs/fess/suggest/request/popularwords/PopularWordsRequest.java

                        deferred.reject(new SuggesterException("Search failure. Failed shards num:" + searchResponse.getFailedShards()));
                    } else {
                        deferred.resolve(createResponse(searchResponse));
                    }
                }
    
                @Override
                public void onFailure(final Exception e) {
                    deferred.reject(e);
                }
            });
        }
    Created: Fri Apr 17 09:08:13 GMT 2026
    - Last Modified: Thu Aug 07 02:41:28 GMT 2025
    - 9.2K bytes
    - Click Count (0)
  9. src/main/java/org/codelibs/fess/suggest/request/RequestBuilder.java

     * either express or implied. See the License for the specific language
     * governing permissions and limitations under the License.
     */
    package org.codelibs.fess.suggest.request;
    
    import org.codelibs.fess.suggest.concurrent.Deferred;
    import org.opensearch.transport.client.Client;
    
    /**
     * An abstract class that serves as a builder for creating and executing requests.
     *
     * @param <Req> the type of the request
    Created: Fri Apr 17 09:08:13 GMT 2026
    - Last Modified: Fri Jul 04 14:00:23 GMT 2025
    - 1.6K bytes
    - Click Count (0)
  10. src/main/java/jcifs/dcerpc/ndr/NdrBuffer.java

            final NdrBuffer nb = new NdrBuffer(this.buf, this.start);
            nb.index = idx;
            nb.deferred = this.deferred;
            return nb;
        }
    
        /**
         * Resets the buffer position to the start.
         */
        public void reset() {
            this.index = this.start;
            this.length = 0;
            this.deferred = this;
        }
    
        /**
         * Returns the current index position in the buffer.
         *
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 10.7K bytes
    - Click Count (0)
Back to Top