|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hive.service.AbstractService
org.apache.lens.server.EventServiceImpl
public class EventServiceImpl
Implementation of LensEventService
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.hive.service.Service |
|---|
org.apache.hive.service.Service.STATE |
| Field Summary | |
|---|---|
static org.apache.commons.logging.Log |
LOG
The Constant LOG. |
| Fields inherited from interface org.apache.lens.server.api.events.LensEventService |
|---|
NAME |
| Constructor Summary | |
|---|---|
EventServiceImpl(String name)
Instantiates a new event service impl. |
|
| Method Summary | ||
|---|---|---|
|
addListenerForType(LensEventListener<? super T> listener,
Class<T> eventType)
Add a listener for the given event type. |
|
Map<Class<? extends LensEvent>,List<LensEventListener>> |
getEventListeners()
|
|
|
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 |
removeListener(LensEventListener listener)
Remove this listener instance from all subscribed event types. |
|
|
removeListenerForType(LensEventListener<? super T> listener,
Class<T> eventType)
Remove listener for a given event type. |
|
void |
start()
|
|
void |
stop()
|
|
| Methods inherited from class org.apache.hive.service.AbstractService |
|---|
getHiveConf, getName, getServiceState, getStartTime, register, unregister |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public EventServiceImpl(String name)
name - the name| Method Detail |
|---|
public 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)
LensEventService
removeListener in interface LensEventServicelistener - the listener
public void notifyEvent(LensEvent evt)
throws LensException
LensEventService
notifyEvent in interface LensEventServiceevt - object
LensException - the lens exceptionpublic <T extends LensEvent> Collection<LensEventListener> getListeners(Class<T> eventType)
LensEventService
getListeners in interface LensEventServiceeventType - the change type
public 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)
LensEventService
addListenerForType in interface LensEventServicelistener - the listenereventType - the event type
public <T extends LensEvent> void removeListenerForType(LensEventListener<? super T> listener,
Class<T> eventType)
LensEventService
removeListenerForType in interface LensEventServicelistener - the listenereventType - the event type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||