Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 5 of 5 for drainAll (0.05 seconds)

  1. src/test/java/org/codelibs/fess/util/LogNotificationAppenderTest.java

            assertEquals(0, events.size());
        }
    
        @Test
        public void test_append_nonExcludedLogger() {
            final LogEvent event = createLogEvent(Level.ERROR, "org.codelibs.fess.helper.SystemHelper", "not excluded");
            appender.append(event);
    
            final List<LogNotificationEvent> events = ComponentUtil.getLogNotificationHelper().drainAll();
            assertEquals(1, events.size());
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Mar 26 14:36:23 GMT 2026
    - 10.7K bytes
    - Click Count (0)
  2. src/test/java/org/codelibs/fess/timer/LogNotificationTargetTest.java

        protected void setUp(TestInfo testInfo) throws Exception {
            super.setUp(testInfo);
            ComponentUtil.register(new LogNotificationHelper(), "logNotificationHelper");
            ComponentUtil.getLogNotificationHelper().drainAll();
            ComponentUtil.getFessConfig().setLogNotificationEnabled(true);
            logNotificationTarget = new LogNotificationTarget();
        }
    
        @Test
        public void test_constructor() {
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Mar 26 02:24:08 GMT 2026
    - 4.7K bytes
    - Click Count (0)
  3. src/main/java/org/codelibs/fess/helper/LogNotificationHelper.java

                }
            }
        }
    
        /**
         * Drains all events from the buffer and returns them as a list.
         *
         * @return a list of all buffered events
         */
        public List<LogNotificationEvent> drainAll() {
            final List<LogNotificationEvent> events = new ArrayList<>();
            LogNotificationEvent event;
            while ((event = queue.poll()) != null) {
                events.add(event);
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Mar 26 02:24:08 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  4. src/test/java/org/codelibs/fess/helper/LogNotificationHelperTest.java

            List<LogNotificationEvent> events = helper.drainAll();
            assertEquals(2, events.size());
            assertEquals("message1", events.get(0).getMessage());
            assertEquals("message2", events.get(1).getMessage());
        }
    
        @Test
        public void test_drainAll_empty() {
            LogNotificationHelper helper = new LogNotificationHelper();
            List<LogNotificationEvent> events = helper.drainAll();
            assertNotNull(events);
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Mar 26 02:24:08 GMT 2026
    - 6.3K bytes
    - Click Count (0)
  5. src/main/java/org/codelibs/fess/timer/LogNotificationTarget.java

            try {
                helper = ComponentUtil.getLogNotificationHelper();
            } catch (final Exception e) {
                return;
            }
    
            final List<LogNotificationEvent> events = helper.drainAll();
            if (events.isEmpty()) {
                return;
            }
    
            try {
                final SearchEngineClient client = ComponentUtil.getSearchEngineClient();
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Mar 26 02:24:08 GMT 2026
    - 4.5K bytes
    - Click Count (0)
Back to Top