@ManagedResource(description="Mongo db based message id repository")
public class MongoDbIdempotentRepository<E>
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.spi.IdempotentRepository<E>
Constructor and Description |
---|
MongoDbIdempotentRepository() |
MongoDbIdempotentRepository(com.mongodb.client.MongoClient mongoClient,
String collectionName,
String dbName) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E key) |
void |
clear() |
boolean |
confirm(E key) |
boolean |
contains(E key) |
protected void |
doStart() |
protected void |
doStop() |
String |
getCollectionName() |
String |
getDbName() |
com.mongodb.client.MongoClient |
getMongoClient() |
boolean |
remove(E key) |
void |
setCollectionName(String collectionName) |
void |
setDbName(String dbName) |
void |
setMongoClient(com.mongodb.client.MongoClient mongoClient) |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
@ManagedOperation(description="Adds the key to the store") public boolean add(E key)
add
in interface org.apache.camel.spi.IdempotentRepository<E>
@ManagedOperation(description="Does the store contain the given key") public boolean contains(E key)
contains
in interface org.apache.camel.spi.IdempotentRepository<E>
@ManagedOperation(description="Remove the key from the store") public boolean remove(E key)
remove
in interface org.apache.camel.spi.IdempotentRepository<E>
public boolean confirm(E key)
confirm
in interface org.apache.camel.spi.IdempotentRepository<E>
@ManagedOperation(description="Clear the store") public void clear()
clear
in interface org.apache.camel.spi.IdempotentRepository<E>
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.ServiceSupport
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.ServiceSupport
Exception
public com.mongodb.client.MongoClient getMongoClient()
public void setMongoClient(com.mongodb.client.MongoClient mongoClient)
public String getCollectionName()
public void setCollectionName(String collectionName)
public String getDbName()
public void setDbName(String dbName)
Apache Camel