Class Arangobee

java.lang.Object
com.github.arangobee.Arangobee
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

public class Arangobee extends Object implements org.springframework.beans.factory.InitializingBean
Arangobee runner
Since:
26/07/2014
Author:
lstolowski
  • 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

      public Arangobee dao(ChangeEntryDao dao)
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      For Spring users: executing arangobee after bean is created in the Spring context
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception - exception
    • execute

      public void execute() throws ArangobeeException
      Executing migration
      Throws:
      ArangobeeException - exception
    • isExecutionInProgress

      public boolean isExecutionInProgress() throws ArangobeeConnectionException
      Returns:
      true if an execution is in progress, in any process.
      Throws:
      ArangobeeConnectionException - exception
    • setChangeLogsScanPackage

      public Arangobee setChangeLogsScanPackage(String changeLogsScanPackage)
      Package name where @ChangeLog-annotated classes are kept.
      Parameters:
      changeLogsScanPackage - package where your changelogs are
      Returns:
      Arangobee object for fluent interface
    • setWaitForLock

      public Arangobee setWaitForLock(boolean waitForLock)
      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

      public Arangobee setChangeLogLockWaitTime(long changeLogLockWaitTime)
      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

      public Arangobee setChangeLogLockPollRate(long changeLogLockPollRate)
      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

      public Arangobee setThrowExceptionIfCannotObtainLock(boolean throwExceptionIfCannotObtainLock)
      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

      public Arangobee setSpringEnvironment(org.springframework.core.env.Environment environment)
      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

      public Arangobee setChangelogCollectionName(String changelogCollectionName)
      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

      public Arangobee setLockCollectionName(String lockCollectionName)
      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.