public class EventServiceImpl extends org.apache.hive.service.AbstractService implements LensEventService
NAME| Constructor and Description |
|---|
EventServiceImpl(String name)
Instantiates a new event service impl.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends LensEvent> |
addListenerForType(LensEventListener<? super T> listener,
Class<T> eventType)
Add a listener for the given event type.
|
Map<Class<? extends LensEvent>,List<LensEventListener>> |
getEventListeners() |
HealthStatus |
getHealthStatus()
Returns the health status of the service.
|
<T extends LensEvent> |
getListeners(Class<T> eventType)
Get all listeners of a particular type.
|
void |
init(org.apache.hadoop.hive.conf.HiveConf hiveConf) |
void |
notifyEvent(LensEvent evt)
Process an event, and notify all listeners interested in this event.
|
void |
notifyEventSync(LensEvent event)
Process an event synchronously.
|
void |
removeListener(LensEventListener listener)
Remove this listener instance from all subscribed event types.
|
<T extends LensEvent> |
removeListenerForType(LensEventListener<? super T> listener,
Class<T> eventType)
Remove listener for a given event type.
|
void |
start() |
void |
stop() |
public EventServiceImpl(String name)
name - the namepublic void init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
init in interface org.apache.hive.service.Serviceinit in class org.apache.hive.service.AbstractServicepublic void removeListener(LensEventListener listener)
LensEventServiceremoveListener in interface LensEventServicelistener - the listenerpublic void notifyEvent(LensEvent evt) throws LensException
LensEventServicenotifyEvent in interface LensEventServiceevt - objectLensException - the lens exceptionpublic <T extends LensEvent> Collection<LensEventListener> getListeners(Class<T> eventType)
LensEventServicegetListeners in interface LensEventServiceeventType - the change typepublic void notifyEventSync(LensEvent event) throws LensException
LensEventServicenotifyEventSync in interface LensEventServiceLensExceptionpublic HealthStatus getHealthStatus()
HealthCheckablegetHealthStatus in interface HealthCheckablepublic void start()
start in interface org.apache.hive.service.Servicestart in class org.apache.hive.service.AbstractServicepublic void stop()
stop in interface org.apache.hive.service.Servicestop in class org.apache.hive.service.AbstractServicepublic Map<Class<? extends LensEvent>,List<LensEventListener>> getEventListeners()
public <T extends LensEvent> void addListenerForType(LensEventListener<? super T> listener, Class<T> eventType)
LensEventServiceaddListenerForType in interface LensEventServicelistener - the listenereventType - the event typepublic <T extends LensEvent> void removeListenerForType(LensEventListener<? super T> listener, Class<T> eventType)
LensEventServiceremoveListenerForType in interface LensEventServicelistener - the listenereventType - the event typeCopyright © 2014–2018 Apache Software Foundation. All rights reserved.