T
- Type of Eventpublic class EventDispatcher<T extends Event> extends org.apache.hadoop.service.AbstractService implements EventHandler<T>
Constructor and Description |
---|
EventDispatcher(EventHandler<T> handler,
String name) |
Modifier and Type | Method and 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, waitForServiceToStop
public EventDispatcher(EventHandler<T> handler, String name)
protected void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.AbstractService
Exception
public 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–2024 Apache Software Foundation. All rights reserved.