Package com.github.arangobee
Class Arangobee
java.lang.Object
com.github.arangobee.Arangobee
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
Arangobee runner
- Since:
- 26/07/2014
- Author:
- lstolowski
-
Constructor Summary
ConstructorsConstructorDescriptionArangobee(com.arangodb.ArangoDatabase arangoDatabase, org.springframework.beans.factory.config.AutowireCapableBeanFactory autowireCapableBeanFactory) Arangobee(com.arangodb.ArangoDatabase arangoDatabase, org.springframework.beans.factory.config.AutowireCapableBeanFactory autowireCapableBeanFactory, int autowireMode) -
Method Summary
Modifier and TypeMethodDescriptionvoidFor Spring users: executing arangobee after bean is created in the Spring contextvoidclose()Closes the Arango instance used by Arangobee.dao(ChangeEntryDao dao) voidexecute()Executing migrationbooleansetChangelogCollectionName(String changelogCollectionName) Overwrites a default Arangobee changelog collection hardcoded in DEFAULT_CHANGELOG_COLLECTION_NAME.setChangeLogLockPollRate(long changeLogLockPollRate) Poll rate for acquiring lock if waitForLock is truesetChangeLogLockWaitTime(long changeLogLockWaitTime) Waiting time for acquiring lock if waitForLock is truesetChangeLogsScanPackage(String changeLogsScanPackage) Package name where @ChangeLog-annotated classes are kept.setLockCollectionName(String lockCollectionName) Overwrites a default Arangobee lock collection hardcoded in DEFAULT_LOCK_COLLECTION_NAMEsetSpringEnvironment(org.springframework.core.env.Environment environment) Set Environment object for Spring Profiles (@Profile) integrationsetThrowExceptionIfCannotObtainLock(boolean throwExceptionIfCannotObtainLock) Feature which enables/disables throwing ArangobeeLockException if Arangobee can not obtain locksetWaitForLock(boolean waitForLock) Feature which enables/disables waiting for lock if it's already obtained
-
Constructor Details
-
Arangobee
public Arangobee(com.arangodb.ArangoDatabase arangoDatabase, org.springframework.beans.factory.config.AutowireCapableBeanFactory autowireCapableBeanFactory) -
Arangobee
public Arangobee(com.arangodb.ArangoDatabase arangoDatabase, org.springframework.beans.factory.config.AutowireCapableBeanFactory autowireCapableBeanFactory, int autowireMode)
-
-
Method Details
-
dao
-
afterPropertiesSet
For Spring users: executing arangobee after bean is created in the Spring context- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception- exception
-
execute
Executing migration- Throws:
ArangobeeException- exception
-
isExecutionInProgress
- Returns:
- true if an execution is in progress, in any process.
- Throws:
ArangobeeConnectionException- exception
-
setChangeLogsScanPackage
Package name where @ChangeLog-annotated classes are kept.- Parameters:
changeLogsScanPackage- package where your changelogs are- Returns:
- Arangobee object for fluent interface
-
setWaitForLock
Feature which enables/disables waiting for lock if it's already obtained- Parameters:
waitForLock- Arangobee will be waiting for lock if it's already obtained if this option is set to true- Returns:
- Arangobee object for fluent interface
-
setChangeLogLockWaitTime
Waiting time for acquiring lock if waitForLock is true- Parameters:
changeLogLockWaitTime- Waiting time in minutes for acquiring lock- Returns:
- Arangobee object for fluent interface
-
setChangeLogLockPollRate
Poll rate for acquiring lock if waitForLock is true- Parameters:
changeLogLockPollRate- Poll rate in seconds for acquiring lock- Returns:
- Arangobee object for fluent interface
-
setThrowExceptionIfCannotObtainLock
Feature which enables/disables throwing ArangobeeLockException if Arangobee can not obtain lock- Parameters:
throwExceptionIfCannotObtainLock- Arangobee will throw ArangobeeLockException if lock can not be obtained- Returns:
- Arangobee object for fluent interface
-
setSpringEnvironment
Set Environment object for Spring Profiles (@Profile) integration- Parameters:
environment- org.springframework.core.env.Environment object to inject- Returns:
- Arangobee object for fluent interface
-
setChangelogCollectionName
Overwrites a default Arangobee changelog collection hardcoded in DEFAULT_CHANGELOG_COLLECTION_NAME. CAUTION! Use this method carefully - when changing the name on a existing system, your changelogs will be executed again on your ArangoDB instance- Parameters:
changelogCollectionName- a new changelog collection name- Returns:
- Arangobee object for fluent interface
-
setLockCollectionName
Overwrites a default Arangobee lock collection hardcoded in DEFAULT_LOCK_COLLECTION_NAME- Parameters:
lockCollectionName- a new lock collection name- Returns:
- Arangobee object for fluent interface
-
close
public void close()Closes the Arango instance used by Arangobee. This will close either the connection Arangobee was initiated with or that which was internally created.
-