Package com.github.arangobee.dao
Class ChangeEntryDao
java.lang.Object
com.github.arangobee.dao.ChangeEntryDao
- Since:
- 11/03/2019
- Author:
- Christophe Moine
-
Constructor Summary
ConstructorsConstructorDescriptionChangeEntryDao(String changelogCollectionName, String lockCollectionName, boolean waitForLock, long changeLogLockWaitTime, long changeLogLockPollRate, boolean throwExceptionIfCannotObtainLock) -
Method Summary
Modifier and TypeMethodDescriptionTry to acquire process lockvoidclose()com.arangodb.ArangoDatabaseconnectDb(com.arangodb.ArangoDatabase arangoDatabase) com.arangodb.ArangoDatabaselonglongbooleanisNewChange(ChangeEntry changeEntry) booleanbooleanbooleanvoidreleaseProcessLock(String lock) voidsave(ChangeEntry changeEntry) voidsetChangelogCollectionName(String changelogCollectionName) voidsetChangeLogLockPollRate(long changeLogLockPollRate) voidsetChangeLogLockWaitTime(long changeLogLockWaitTime) voidsetIndexDao(ChangeEntryIndexDao changeEntryIndexDao) voidsetLockCollectionName(String lockCollectionName) voidsetThrowExceptionIfCannotObtainLock(boolean throwExceptionIfCannotObtainLock) voidsetWaitForLock(boolean waitForLock)
-
Constructor Details
-
ChangeEntryDao
-
-
Method Details
-
getArangoDatabase
public com.arangodb.ArangoDatabase getArangoDatabase() -
connectDb
public com.arangodb.ArangoDatabase connectDb(com.arangodb.ArangoDatabase arangoDatabase) -
acquireProcessLock
Try to acquire process lock- Returns:
- true if successfully acquired, false otherwise
- Throws:
ArangobeeConnectionException- exceptionArangobeeLockException- exception
-
releaseProcessLock
- Throws:
ArangobeeConnectionException
-
isProccessLockHeld
- Throws:
ArangobeeConnectionException
-
isNewChange
- Throws:
ArangobeeConnectionException
-
save
- Throws:
ArangobeeConnectionException
-
close
public void close() -
setIndexDao
-
setChangelogCollectionName
-
setLockCollectionName
-
isWaitForLock
public boolean isWaitForLock() -
setWaitForLock
public void setWaitForLock(boolean waitForLock) -
getChangeLogLockWaitTime
public long getChangeLogLockWaitTime() -
setChangeLogLockWaitTime
public void setChangeLogLockWaitTime(long changeLogLockWaitTime) -
getChangeLogLockPollRate
public long getChangeLogLockPollRate() -
setChangeLogLockPollRate
public void setChangeLogLockPollRate(long changeLogLockPollRate) -
isThrowExceptionIfCannotObtainLock
public boolean isThrowExceptionIfCannotObtainLock() -
setThrowExceptionIfCannotObtainLock
public void setThrowExceptionIfCannotObtainLock(boolean throwExceptionIfCannotObtainLock)
-