|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 nameMethod Detail |
---|
public void init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
init
in interface org.apache.hive.service.Service
init
in class org.apache.hive.service.AbstractService
public void removeListener(LensEventListener listener)
LensEventService
removeListener
in interface LensEventService
listener
- the listenerpublic void notifyEvent(LensEvent evt) throws LensException
LensEventService
notifyEvent
in interface LensEventService
evt
- object
LensException
- the lens exceptionpublic <T extends LensEvent> Collection<LensEventListener> getListeners(Class<T> eventType)
LensEventService
getListeners
in interface LensEventService
eventType
- the change type
public void start()
start
in interface org.apache.hive.service.Service
start
in class org.apache.hive.service.AbstractService
public void stop()
stop
in interface org.apache.hive.service.Service
stop
in class org.apache.hive.service.AbstractService
public Map<Class<? extends LensEvent>,List<LensEventListener>> getEventListeners()
public <T extends LensEvent> void addListenerForType(LensEventListener<? super T> listener, Class<T> eventType)
LensEventService
addListenerForType
in interface LensEventService
listener
- the listenereventType
- the event typepublic <T extends LensEvent> void removeListenerForType(LensEventListener<? super T> listener, Class<T> eventType)
LensEventService
removeListenerForType
in interface LensEventService
listener
- the listenereventType
- the event type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |