T - Type of Eventjava.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.Service, EventHandler<T>public class EventDispatcher<T extends Event> extends org.apache.hadoop.service.AbstractService implements EventHandler<T>
| Constructor | Description |
|---|---|
EventDispatcher(EventHandler<T> handler,
java.lang.String name) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
disableExitOnError() |
|
protected long |
getEventProcessorId() |
|
int |
getEventQueueSize() |
|
void |
handle(T event) |
|
protected boolean |
isStopped() |
|
protected void |
serviceStart() |
|
protected void |
serviceStop() |
|
void |
setMetrics(EventTypeMetrics metrics) |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic EventDispatcher(EventHandler<T> handler, java.lang.String name)
protected void serviceStart()
throws java.lang.Exception
serviceStart in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStop()
throws java.lang.Exception
serviceStop in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionpublic void handle(T event)
handle in interface EventHandler<T extends Event>@VisibleForTesting public void disableExitOnError()
public void setMetrics(EventTypeMetrics metrics)
protected long getEventProcessorId()
protected boolean isStopped()
public int getEventQueueSize()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.