org.apache.hadoop.yarn.event
Class AsyncDispatcher
java.lang.Object
org.apache.hadoop.yarn.service.AbstractService
org.apache.hadoop.yarn.event.AsyncDispatcher
- All Implemented Interfaces:
- Dispatcher, Service
public class AsyncDispatcher
- extends AbstractService
- implements Dispatcher
Dispatches events in a separate thread. Currently only single thread does
that. Potentially there could be multiple channels for each event type
class and a thread pool can be used to dispatch the events.
| Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.service.Service |
Service.STATE |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
eventDispatchers
protected final Map<Class<? extends Enum>,EventHandler> eventDispatchers
AsyncDispatcher
public AsyncDispatcher()
AsyncDispatcher
public AsyncDispatcher(BlockingQueue<Event> eventQueue)
init
public void init(org.apache.hadoop.conf.Configuration conf)
- Specified by:
init in interface Service- Overrides:
init in class AbstractService
start
public void start()
- Specified by:
start in interface Service- Overrides:
start in class AbstractService
stop
public void stop()
- Specified by:
stop in interface Service- Overrides:
stop in class AbstractService
dispatch
protected void dispatch(Event event)
register
public void register(Class<? extends Enum> eventType,
EventHandler handler)
- Specified by:
register in interface Dispatcher
getEventHandler
public EventHandler getEventHandler()
- Specified by:
getEventHandler in interface Dispatcher
Copyright © 2012 Apache Software Foundation. All Rights Reserved.