Class EventPublisher
java.lang.Object
org.ovirt.vdsm.jsonrpc.client.events.EventPublisher
- All Implemented Interfaces:
Flow.Publisher<Map<String,Object>>
Jsonrpc implementation of
Flow.Publisher-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classEvent processing task which is submit to aExecutorServicefor processing. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EventDecomposerprivate final intprivate final ExecutorServiceprivate static final org.slf4j.Loggerprivate final SubscriptionMatcherprivate final ScheduledExecutorService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidclean(SubscriptionHolder holder) voidvoidclose()intcountEvents(JsonRpcEvent event) private voidprocess(SubscriptionHolder holder) voidprocess(JsonRpcEvent event) This method is used by @linkResponseWorkerto submit an @linkJsonRpcEventfor processing.voidprivate voidvoidsubscribe(Flow.Subscriber<? super Map<String, Object>> subscriber)
-
Field Details
-
log
private static final org.slf4j.Logger log -
executorService
-
scheduledExecutorService
-
matcher
-
decomposer
-
eventTimeoutInHours
private final int eventTimeoutInHours
-
-
Constructor Details
-
EventPublisher
-
-
Method Details
-
scheduleCleanupTask
private void scheduleCleanupTask() -
cleanupOldEvents
public void cleanupOldEvents() -
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<Map<String,Object>>
-
publish
- Throws:
IOException
-
process
-
clean
-
process
This method is used by @linkResponseWorkerto submit an @linkJsonRpcEventfor processing.- Parameters:
event- which is submitted for processing.
-
countEvents
-
close
public void close()
-