org.wso2.carbon.databridge.agent.thrift.internal
Class EventQueue<E>
java.lang.Object
org.wso2.carbon.databridge.agent.thrift.internal.EventQueue<E>
- Type Parameters:
E -
public class EventQueue<E>
- extends Object
Queue containing the incoming events of a DataPublisher.
|
Method Summary |
LinkedBlockingQueue<org.wso2.carbon.databridge.commons.Event> |
getAndResetQueue()
|
org.wso2.carbon.databridge.commons.Event |
poll()
Polls the event queue and updates the dispatching state of the queue |
boolean |
put(org.wso2.carbon.databridge.commons.Event event)
Puts the event to the Queue and informs the dispatching state of the queue |
short |
tryPut(org.wso2.carbon.databridge.commons.Event event)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventQueue
public EventQueue()
poll
public org.wso2.carbon.databridge.commons.Event poll()
- Polls the event queue and updates the dispatching state of the queue
- Returns:
- event if exist
put
public boolean put(org.wso2.carbon.databridge.commons.Event event)
throws InterruptedException
- Puts the event to the Queue and informs the dispatching state of the queue
- Parameters:
event - to be sent
- Returns:
- true if event queue is scheduled to be dispatches else false
- Throws:
InterruptedException
tryPut
public short tryPut(org.wso2.carbon.databridge.commons.Event event)
throws InterruptedException
- Throws:
InterruptedException
getAndResetQueue
public LinkedBlockingQueue<org.wso2.carbon.databridge.commons.Event> getAndResetQueue()
Copyright © 2015 WSO2. All rights reserved.