org.apache.camel.component.mongodb
Class MongoDbTailingProcess

java.lang.Object
  extended by org.apache.camel.component.mongodb.MongoDbTailingProcess
All Implemented Interfaces:
Runnable

public class MongoDbTailingProcess
extends Object
implements Runnable


Field Summary
 boolean keepRunning
           
 boolean stopped
           
 
Constructor Summary
MongoDbTailingProcess(MongoDbEndpoint endpoint, MongoDbTailableCursorConsumer consumer, MongoDbTailTrackingManager tailTrack)
           
 
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
 

Field Detail

keepRunning

public volatile boolean keepRunning

stopped

public volatile boolean stopped
Constructor Detail

MongoDbTailingProcess

public MongoDbTailingProcess(MongoDbEndpoint endpoint,
                             MongoDbTailableCursorConsumer consumer,
                             MongoDbTailTrackingManager tailTrack)
Method Detail

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