Package de.hdi.mongobumblebee.dao
Class ChangeEntryDao
java.lang.Object
de.hdi.mongobumblebee.dao.ChangeEntryDao
- Since:
- 27/07/2014
- Author:
- lstolowski
-
Constructor Summary
ConstructorsConstructorDescriptionChangeEntryDao(String changelogCollectionName, String lockCollectionName, boolean waitForLock, long changeLogLockWaitTime, long changeLogLockPollRate, boolean throwExceptionIfCannotObtainLock) -
Method Summary
Modifier and TypeMethodDescriptionbooleanTry to acquire process lockvoidclose()com.mongodb.client.MongoDatabaseconnectMongoDb(com.mongodb.client.MongoClient mongoClient, String dbName) booleanisNewChange(ChangeEntry changeEntry) booleanbooleanvoidvoidsave(ChangeEntry changeEntry) voidsetChangelogCollectionName(String changelogCollectionName) voidsetIndexDao(ChangeEntryIndexDao changeEntryIndexDao) voidsetLockCollectionName(String lockCollectionName) voidsetThrowExceptionIfCannotObtainLock(boolean throwExceptionIfCannotObtainLock)
-
Constructor Details
-
ChangeEntryDao
-
-
Method Details
-
connectMongoDb
public com.mongodb.client.MongoDatabase connectMongoDb(com.mongodb.client.MongoClient mongoClient, String dbName) throws MongoBumblebeeConfigurationException -
acquireProcessLock
public boolean acquireProcessLock() throws MongoBumblebeeConnectionException, MongoBumblebeeLockExceptionTry to acquire process lock- Returns:
- true if successfully acquired, false otherwise
- Throws:
MongoBumblebeeConnectionException- exceptionMongoBumblebeeLockException- exception
-
releaseProcessLock
-
isProccessLockHeld
-
isNewChange
-
save
-
close
public void close() -
setIndexDao
-
setChangelogCollectionName
-
setLockCollectionName
-
isThrowExceptionIfCannotObtainLock
public boolean isThrowExceptionIfCannotObtainLock() -
setThrowExceptionIfCannotObtainLock
public void setThrowExceptionIfCannotObtainLock(boolean throwExceptionIfCannotObtainLock)
-