@ManagedResource(description="Mongo db based message id repository")
public class MongoDbIdempotentRepository
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.IdempotentRepository
| Constructor and Description |
|---|
MongoDbIdempotentRepository() |
MongoDbIdempotentRepository(com.mongodb.client.MongoClient mongoClient,
String collectionName,
String dbName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(String key) |
void |
clear() |
boolean |
confirm(String key) |
boolean |
contains(String key) |
protected void |
doStart() |
protected void |
doStop() |
String |
getCollectionName() |
String |
getDbName() |
com.mongodb.client.MongoClient |
getMongoClient() |
boolean |
remove(String key) |
void |
setCollectionName(String collectionName) |
void |
setDbName(String dbName) |
void |
setMongoClient(com.mongodb.client.MongoClient mongoClient) |
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, confirm, contains, remove@ManagedOperation(description="Adds the key to the store") public boolean add(String key)
add in interface org.apache.camel.spi.IdempotentRepository@ManagedOperation(description="Does the store contain the given key") public boolean contains(String key)
contains in interface org.apache.camel.spi.IdempotentRepository@ManagedOperation(description="Remove the key from the store") public boolean remove(String key)
remove in interface org.apache.camel.spi.IdempotentRepositorypublic boolean confirm(String key)
confirm in interface org.apache.camel.spi.IdempotentRepository@ManagedOperation(description="Clear the store") public void clear()
clear in interface org.apache.camel.spi.IdempotentRepositoryprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.service.BaseServiceExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.service.BaseServiceExceptionpublic 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