org.apache.camel.component.mongodb
Class MongoDbTailingProcess
java.lang.Object
org.apache.camel.component.mongodb.MongoDbTailingProcess
- All Implemented Interfaces:
- Runnable
public class MongoDbTailingProcess
- extends Object
- implements Runnable
Method Summary |
com.mongodb.DBCursor |
getCursor()
|
void |
initializeProcess()
Initialise the tailing process, the cursor and if persistent tail tracking is enabled, recover the cursor from the persisted point. |
void |
run()
The heart of the tailing process. |
protected void |
stop()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keepRunning
public volatile boolean keepRunning
stopped
public volatile boolean stopped
MongoDbTailingProcess
public MongoDbTailingProcess(MongoDbEndpoint endpoint,
MongoDbTailableCursorConsumer consumer,
MongoDbTailTrackingManager tailTrack)
getCursor
public com.mongodb.DBCursor getCursor()
initializeProcess
public void initializeProcess()
throws Exception
- Initialise the tailing process, the cursor and if persistent tail tracking is enabled, recover the cursor from the persisted point.
As part of the initialisation process, the component will validate that the collection we are targeting is 'capped'.
- Throws:
Exception
run
public void run()
- The heart of the tailing process.
- Specified by:
run
in interface Runnable
stop
protected void stop()
throws Exception
- Throws:
Exception
Apache Camel