public final class ThreadedStreamConsumer extends Object implements EventHandler<Event>, Closeable
QueueSynchronizer
the throughput becomes
6.33 mega messages per second
(158 nanoseconds per message, 5 million messages within 0.79 seconds - see the test ThreadedStreamConsumerTest)
on CPU i5 Dual Core 2.6 GHz and Oracle JDK 11.Constructor and Description |
---|
ThreadedStreamConsumer(EventHandler<Event> target) |
public ThreadedStreamConsumer(EventHandler<Event> target)
public void handleEvent(@Nonnull Event event)
handleEvent
in interface EventHandler<Event>
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.