From d479253768d296a40b4f699e1de9b03c7146a97a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 3 Dec 2013 14:03:28 -0800 Subject: Adding javadocs and Carbonado User Guide --- .../repo/sleepycat/BDBRepositoryBuilder.html | 2121 ++++++++++++++++++++ 1 file changed, 2121 insertions(+) create mode 100644 apidocs/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.html (limited to 'apidocs/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.html') diff --git a/apidocs/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.html b/apidocs/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.html new file mode 100644 index 0000000..425a599 --- /dev/null +++ b/apidocs/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.html @@ -0,0 +1,2121 @@ + + + + + + +BDBRepositoryBuilder (Carbonado 1.2.3 API) + + + + + + + +
+ + + + + +
+ + + +
+
com.amazon.carbonado.repo.sleepycat
+

Class BDBRepositoryBuilder

+
+
+ +
+ +
+
+
    +
  • + + + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      Repositorybuild(java.util.concurrent.atomic.AtomicReference<Repository> rootRef) +
      Builds a repository instance.
      +
      voiderrorCheck(java.util.Collection<java.lang.String> messages) +
      This method is called by assertReady, and subclasses must override to + perform custom checks.
      +
      BDBProductgetBDBProduct() +
      Returns the BDB product to use, which is JE by default.
      +
      java.lang.IntegergetCachePercent() +
      Returns the percent of JVM heap used by the repository cache, or + null if default should be selected.
      +
      java.lang.LonggetCacheSize() +
      Returns the repository cache size, or null if default should be + selected.
      +
      intgetCheckpointInterval() 
      intgetCheckpointThresholdKB() 
      intgetCheckpointThresholdMinutes() 
      java.lang.BooleangetChecksumEnabled() +
      Returns true if checksum verification is enabled.
      +
      java.lang.StringgetCompressor(java.lang.String type) +
      Return the compressor used for the given storable.
      +
      BDBRepositoryBuilder.DatabaseHookgetDatabaseHook() +
      Returns the custom open database hook, or null if none.
      +
      java.lang.BooleangetDatabasesTransactional() +
      Returns true if the databases are configured to be transactional, + false if configured to not be transactional, null if this override was never set
      +
      java.lang.StringgetDataHome() +
      Returns the directory to store data files.
      +
      java.io.FilegetDataHomeFile() +
      Returns the optional directory to store data files.
      +
      java.lang.StringgetEnvironmentHome() +
      Returns the repository environment home directory.
      +
      java.io.FilegetEnvironmentHomeFile() +
      Returns the repository environment home directory.
      +
      doublegetIndexRepairThrottle() +
      Returns the throttle parameter used when indexes are added, dropped or + bulk repaired.
      +
      booleangetIndexSupport() +
      Returns true if indexes are supported, which is true by default.
      +
      java.lang.ObjectgetInitialDatabaseConfig() +
      Returns the optional BDB specific database configuration to use + for all databases created.
      +
      java.lang.ObjectgetInitialEnvironmentConfig() +
      Returns the optional BDB specific environment configuration to use.
      +
      booleangetInitializeLogging() 
      booleangetKeepOldLogFiles() +
      Returns false by default.
      +
      booleangetLockConflictDeadlockDetectMode() +
      Returns true if deadlock detection is run whenever a lock conflict occurs.
      +
      doublegetLockTimeout() +
      Returns the lock timeout, in seconds.
      +
      longgetLockTimeoutInMicroseconds() +
      Returns the lock timeout, in microseconds, limited to max long value.
      +
      java.lang.IntegergetLogFileMaxSize() +
      Returns null if default size will be used.
      +
      booleangetLogInMemory() +
      Returns false by default, indicating that transaction logs are persisted.
      +
      java.lang.IntegergetLogRegionSize() +
      Returns the repository log region size, or null if the default + should be selected.
      +
      java.lang.IntegergetMaxLocks() 
      java.lang.StringgetName() +
      Returns the name of the repository.
      +
      BDBPanicHandlergetPanicHandler() +
      Return the panic handler to call if the database panics.
      +
      java.lang.RunnablegetPreShutdownHook() +
      Returns the custom shutdown hook that runs before the repository has + finished running its own shutdown hooks, or null if none.
      +
      java.lang.StringgetProduct() +
      Returns the BDB product to use, which is JE by default.
      +
      booleangetReadOnly() +
      Returns true if repository should be opened read-only.
      +
      booleangetRunCheckpointer() +
      Returns true if checkpointer is run automatically.
      +
      booleangetRunDeadlockDetector() +
      Returns true if deadlock detector is configured to run.
      +
      booleangetRunFullRecovery() +
      Returns true if a full (catastrophic) recovery should be performed when + environment is opened.
      +
      java.lang.RunnablegetShutdownHook() +
      Returns the custom shutdown hook that runs after the repository has + finished running its own shutdown hooks, or null if none.
      +
      java.lang.StringgetSingleFileName() +
      Returns the single file that all BDB databases should reside in.
      +
      StorableCodecFactorygetStorableCodecFactory() +
      Returns the storable codec factory used.
      +
      java.lang.IntegergetTransactionMaxActive() +
      Returns the maximum number of concurrent transactions, or null if the + default is used.
      +
      booleangetTransactionNoSync() +
      Returns true if transactions are not written or flushed to disk.
      +
      doublegetTransactionTimeout() +
      Returns the repository transaction timeout, in seconds.
      +
      longgetTransactionTimeoutInMicroseconds() +
      Returns the repository transaction timeout, in microseconds, limited to + max long value.
      +
      booleangetTransactionWriteNoSync() +
      Returns true if transactions are not flushed to disk.
      +
      booleanisIndexRepairEnabled() 
      booleanisMaster() +
      Returns true if repository should assume the role of master, which is + true by default.
      +
      booleanisMultiversion() +
      Returns false by default because multiversion concurrency control (MVCC) + is not enabled.
      +
      booleanisPrivate() +
      Returns true if BDB environment is private.
      +
      booleanisReverseSplitOff() 
      voidsetBDBProduct(BDBProduct product) +
      Sets the BDB product to use, which defaults to JE.
      +
      voidsetCachePercent(int cachePercent) +
      Set the percent of JVM heap used by the repository cache.
      +
      voidsetCachePercent(java.lang.Integer cachePercent) +
      Set the percent of JVM heap used by the repository cache.
      +
      voidsetCacheSize(long cacheSize) +
      Set the repository cache size, in bytes.
      +
      voidsetCacheSize(java.lang.Long cacheSize) +
      Set the repository cache size, in bytes.
      +
      voidsetCheckpointInterval(int intervalMillis) +
      Set the interval to run checkpoints.
      +
      voidsetCheckpointThresholdKB(int thresholdKB) +
      Set the size threshold to run checkpoints.
      +
      voidsetCheckpointThresholdMinutes(int thresholdMinutes) +
      Set the time threshold to run checkpoints.
      +
      voidsetChecksumEnabled(java.lang.Boolean checksumEnabled) +
      When true, enable checksum verification of pages read into the cache + from the backing filestore.
      +
      voidsetCompressor(java.lang.String type, + java.lang.String compressionType) +
      Set the compressor for the given class, overriding a custom StorableCodecFactory.
      +
      voidsetDatabaseHook(BDBRepositoryBuilder.DatabaseHook hook) +
      Sets a hook to be called whenever a database is opened.
      +
      voidsetDatabasePageSize(java.lang.Integer bytes, + java.lang.Class<? extends Storable> type) +
      Sets the desired page size for a given type.
      +
      voidsetDatabasesTransactional(java.lang.Boolean transactional) +
      When true, allows databases to be transactional.
      +
      voidsetDataHome(java.lang.String dir) +
      By default, data files are stored relative to the environment home.
      +
      voidsetDataHomeFile(java.io.File dir) +
      By default, data files are stored relative to the environment home.
      +
      voidsetEnvironmentHome(java.lang.String envHome) +
      Sets the repository environment home directory, which is required.
      +
      voidsetEnvironmentHomeFile(java.io.File envHome) +
      Sets the repository environment home directory, which is required.
      +
      voidsetFileName(java.lang.String filename, + java.lang.String typeName) +
      Specify the file that a BDB database should reside in, except for log + files and caches.
      +
      voidsetIndexRepairEnabled(boolean enabled) +
      By default, index repair is enabled.
      +
      voidsetIndexRepairThrottle(double desiredSpeed) +
      Sets the throttle parameter used when indexes are added, dropped or bulk + repaired.
      +
      voidsetIndexSupport(boolean indexSupport) +
      By default, user specified indexes are supported.
      +
      voidsetInitialDatabaseConfig(java.lang.Object dbConfig) +
      Optionally set the BDB specific database configuration to use + for all databases created.
      +
      voidsetInitialEnvironmentConfig(java.lang.Object envConfig) +
      Optionally set the BDB specific environment configuration to + use.
      +
      voidsetInitializeLogging(boolean b) +
      Ensure the transaction logging sub-system is initialized, which is + usually implied.
      +
      voidsetKeepOldLogFiles(boolean keep) +
      By default, transaction log files are deleted when no longer needed.
      +
      voidsetLockConflictDeadlockDetectMode(boolean b) +
      Enable deadlock detection whenever a lock conflict occurs.
      +
      voidsetLockTimeout(double lockTimeout) +
      Set the lock timeout, in seconds.
      +
      voidsetLogFileMaxSize(java.lang.Integer sizeInBytes) +
      Set the maximum transaction log file size for the BDB environment.
      +
      voidsetLogInMemory(boolean logInMemory) +
      Set true to store transaction logs in memory only instead of persistent + storage.
      +
      voidsetLogRegionSize(int logRegionSize) +
      Set the repository log region size, in bytes.
      +
      voidsetLogRegionSize(java.lang.Integer logRegionSize) +
      Set the repository log region size, in bytes.
      +
      voidsetMaster(boolean b) +
      Set to false if repository should not assume the role of master.
      +
      voidsetMaxLocks(java.lang.Integer max) 
      voidsetMultiversion(boolean multiversion) +
      Set true to enable multiversion concurrency control (MVCC) on BDB + environment.
      +
      voidsetName(java.lang.String name) +
      Set name for the repository, which is required.
      +
      voidsetPanicHandler(BDBPanicHandler handler) +
      Set the handler to call if the database panics.
      +
      voidsetPreShutdownHook(java.lang.Runnable hook) +
      Sets a callback to be invoked before the repository has finished running + its own shutdown hooks.
      +
      voidsetPrivate(boolean b) +
      When true, BDB environment cannot be shared by other processes, and + region files are not created.
      +
      voidsetProduct(java.lang.String product) +
      Sets the BDB product to use, which defaults to JE.
      +
      voidsetReadOnly(boolean readOnly) +
      Sets the repository to read-only mode.
      +
      voidsetReverseSplitOff(boolean off) +
      Pass true to disable reverse split of B-tree nodes to reduce deadlocks.
      +
      voidsetRunCheckpointer(boolean runCheckpointer) +
      Disable automatic checkpointing of database if another process is + responsible for that.
      +
      voidsetRunDeadlockDetector(boolean runDeadlockDetector) +
      Disable automatic deadlock detection of database if another thread is + responsible for that.
      +
      voidsetRunFullRecovery(boolean runRecovery) +
      Pass true to override the default and run a full (catastrophic) recovery + when environment is opened.
      +
      voidsetShutdownHook(java.lang.Runnable hook) +
      Sets a callback to be invoked after repository has finished running its + own shutdown hooks.
      +
      voidsetSingleFileName(java.lang.String filename) +
      Specify that all BDB databases should reside in one file, except for log + files and caches.
      +
      voidsetStorableCodecFactory(StorableCodecFactory factory) +
      Override the default storable codec factory.
      +
      voidsetTransactionMaxActive(java.lang.Integer max) +
      Set the maximum number of concurrent transactions, or pass null to use + the default.
      +
      voidsetTransactionNoSync(boolean noSync) +
      When true, commits are not immediately written or flushed to disk.
      +
      voidsetTransactionTimeout(double txnTimeout) +
      Set the transaction timeout, in seconds.
      +
      voidsetTransactionWriteNoSync(boolean noSync) +
      When true, commits are written, but they are not flushed to disk.
      +
      booleanverify(java.io.PrintStream out) +
      Opens the BDB environment, checks if it is corrupt, and then closes it.
      +
      + +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        BDBRepositoryBuilder

        +
        public BDBRepositoryBuilder()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        build

        +
        public Repository build(java.util.concurrent.atomic.AtomicReference<Repository> rootRef)
        +                 throws RepositoryException
        +
        Description copied from interface: RepositoryBuilder
        +
        Builds a repository instance. + +

        If the repository is being wrapped by a parent repository, the child + repository will need to know this fact for some operations to work + correctly. Since the parent repository is not built yet, a reference is + used instead.

        +
        Parameters:
        rootRef - reference to root parent repository, to be set by + parent repository upon being built
        +
        Throws:
        +
        ConfigurationException - if there is a problem in the builder's configuration
        +
        RepositoryException - if there is a general problem opening the repository
        +
      • +
      + + + +
        +
      • +

        verify

        +
        public boolean verify(java.io.PrintStream out)
        +               throws RepositoryException
        +
        Opens the BDB environment, checks if it is corrupt, and then closes it. + Only one process should open the environment for verification. Expect it + to take a long time.
        +
        Parameters:
        out - optional stream to capture any verfication errors
        +
        Returns:
        true if environment passes verification
        +
        Throws:
        +
        RepositoryException
        +
      • +
      + + + +
        +
      • +

        getName

        +
        public java.lang.String getName()
        +
        Description copied from interface: RepositoryBuilder
        +
        Returns the name of the repository.
        +
      • +
      + + + +
        +
      • +

        setName

        +
        public void setName(java.lang.String name)
        +
        Description copied from interface: RepositoryBuilder
        +
        Set name for the repository, which is required.
        +
      • +
      + + + +
        +
      • +

        isMaster

        +
        public boolean isMaster()
        +
        Description copied from interface: RepositoryBuilder
        +
        Returns true if repository should assume the role of master, which is + true by default. Repositories that link different repositories together + will designate only one as the master. + +

        A master repository is responsible for version and + sequence properties. For insert operations, a master + repository must set these properties if they are uninitialized. For + updates, the version property is checked to see if an OptimisticLockException should be thrown.

        +
        See Also:
        ReplicatedRepositoryBuilder
        +
      • +
      + + + +
        +
      • +

        setMaster

        +
        public void setMaster(boolean b)
        +
        Description copied from interface: RepositoryBuilder
        +
        Set to false if repository should not assume the role of master. By + default, this option is true. Repositories that link different + repositories together will designate only one as the master. + +

        A master repository is responsible for version and + sequence properties. For insert operations, a master + repository must set these properties if they are uninitialized. For + updates, the version property is checked to see if an OptimisticLockException should be thrown.

        +
        See Also:
        ReplicatedRepositoryBuilder
        +
      • +
      + + + +
        +
      • +

        setProduct

        +
        public void setProduct(java.lang.String product)
        +
        Sets the BDB product to use, which defaults to JE. Also supported is DB + and DB_HA. If not supported, an IllegalArgumentException is thrown.
        +
      • +
      + + + +
        +
      • +

        getProduct

        +
        public java.lang.String getProduct()
        +
        Returns the BDB product to use, which is JE by default.
        +
      • +
      + + + +
        +
      • +

        setBDBProduct

        +
        public void setBDBProduct(BDBProduct product)
        +
        Sets the BDB product to use, which defaults to JE.
        +
      • +
      + + + +
        +
      • +

        getBDBProduct

        +
        public BDBProduct getBDBProduct()
        +
        Returns the BDB product to use, which is JE by default.
        +
      • +
      + + + +
        +
      • +

        setEnvironmentHomeFile

        +
        public void setEnvironmentHomeFile(java.io.File envHome)
        +
        Sets the repository environment home directory, which is required.
        +
      • +
      + + + +
        +
      • +

        getEnvironmentHomeFile

        +
        public java.io.File getEnvironmentHomeFile()
        +
        Returns the repository environment home directory.
        +
      • +
      + + + +
        +
      • +

        setEnvironmentHome

        +
        public void setEnvironmentHome(java.lang.String envHome)
        +
        Sets the repository environment home directory, which is required.
        +
        Throws:
        +
        RepositoryException - if environment home is not valid
        +
      • +
      + + + +
        +
      • +

        getEnvironmentHome

        +
        public java.lang.String getEnvironmentHome()
        +
        Returns the repository environment home directory.
        +
      • +
      + + + +
        +
      • +

        setDataHomeFile

        +
        public void setDataHomeFile(java.io.File dir)
        +
        By default, data files are stored relative to the environment home. Call + this method to override. For BDBRepositories that are log files only, + this configuration is ignored.
        +
      • +
      + + + +
        +
      • +

        getDataHomeFile

        +
        public java.io.File getDataHomeFile()
        +
        Returns the optional directory to store data files. Returns null if data + files are expected to be relative to the environment home.
        +
      • +
      + + + +
        +
      • +

        setDataHome

        +
        public void setDataHome(java.lang.String dir)
        +
        By default, data files are stored relative to the environment home. Call + this method to override. For BDBRepositories that are log files only, + this configuration is ignored.
        +
      • +
      + + + +
        +
      • +

        getDataHome

        +
        public java.lang.String getDataHome()
        +
        Returns the directory to store data files.
        +
      • +
      + + + +
        +
      • +

        setSingleFileName

        +
        public void setSingleFileName(java.lang.String filename)
        +
        Specify that all BDB databases should reside in one file, except for log + files and caches. The filename is relative to the environment home, + unless data directories have been specified. For BDBRepositories that + are log files only, this configuration is ignored. + +

        Note: When setting this option, the storable codec factory must also + be changed, since the default storable codec factory is unable to + distinguish storable types that reside in a single database file. Call + setFileName instead to use built-in BDB feature for supporting multiple + databases in one file.

        +
      • +
      + + + +
        +
      • +

        getSingleFileName

        +
        public java.lang.String getSingleFileName()
        +
        Returns the single file that all BDB databases should reside in.
        +
      • +
      + + + +
        +
      • +

        setFileName

        +
        public void setFileName(java.lang.String filename,
        +               java.lang.String typeName)
        +
        Specify the file that a BDB database should reside in, except for log + files and caches. The filename is relative to the environment home, + unless data directories have been specified. For BDBRepositories that + are log files only, this configuration is ignored.
        +
        Parameters:
        filename - BDB database filename
        typeName - type to store in file; if null, the file is used by default + for all types
        +
      • +
      + + + +
        +
      • +

        setIndexSupport

        +
        public void setIndexSupport(boolean indexSupport)
        +
        By default, user specified indexes are supported. Pass false to disable + this, and no indexes will be built. Another consequence of this option + is that no unique constraint checks will be applied to alternate keys.
        +
      • +
      + + + +
        +
      • +

        getIndexSupport

        +
        public boolean getIndexSupport()
        +
        Returns true if indexes are supported, which is true by default.
        +
      • +
      + + + + + + + +
        +
      • +

        setIndexRepairEnabled

        +
        public void setIndexRepairEnabled(boolean enabled)
        +
        By default, index repair is enabled. In this mode, the first time a + Storable type is used, new indexes are populated and old indexes are + removed. Until finished, access to the Storable is blocked. + +

        When index repair is disabled, the Storable is immediately + available. This does have consequences, however. The set of indexes + available for queries is defined by the intersection of the old + and new index sets. The set of indexes that are kept up-to-date is + defined by the union of the old and new index sets. + +

        While index repair is disabled, another process can safely repair the + indexes in the background. When it is complete, index repair can be + enabled for this repository too.

        +
      • +
      + + + +
        +
      • +

        getIndexRepairThrottle

        +
        public double getIndexRepairThrottle()
        +
        Returns the throttle parameter used when indexes are added, dropped or + bulk repaired. By default this value is 1.0, or maximum speed.
        +
      • +
      + + + +
        +
      • +

        setIndexRepairThrottle

        +
        public void setIndexRepairThrottle(double desiredSpeed)
        +
        Sets the throttle parameter used when indexes are added, dropped or bulk + repaired. By default this value is 1.0, or maximum speed.
        +
        Parameters:
        desiredSpeed - 1.0 = perform work at full speed, + 0.5 = perform work at half speed, 0.0 = fully suspend work
        +
      • +
      + + + +
        +
      • +

        setReadOnly

        +
        public void setReadOnly(boolean readOnly)
        +
        Sets the repository to read-only mode. By default, repository is opened + for reads and writes.
        +
      • +
      + + + +
        +
      • +

        getReadOnly

        +
        public boolean getReadOnly()
        +
        Returns true if repository should be opened read-only.
        +
      • +
      + + + +
        +
      • +

        setCacheSize

        +
        public void setCacheSize(long cacheSize)
        +
        Set the repository cache size, in bytes. Actual BDB implementation will + select a suitable default if this is not set.
        +
      • +
      + + + +
        +
      • +

        setCacheSize

        +
        public void setCacheSize(java.lang.Long cacheSize)
        +
        Set the repository cache size, in bytes. Actual BDB implementation will + select a suitable default if this is not set.
        +
        Parameters:
        cacheSize - cache size to use, or null for default
        +
      • +
      + + + +
        +
      • +

        getCacheSize

        +
        public java.lang.Long getCacheSize()
        +
        Returns the repository cache size, or null if default should be + selected.
        +
      • +
      + + + +
        +
      • +

        setLogRegionSize

        +
        public void setLogRegionSize(int logRegionSize)
        +
        Set the repository log region size, in bytes.
        +
      • +
      + + + +
        +
      • +

        setLogRegionSize

        +
        public void setLogRegionSize(java.lang.Integer logRegionSize)
        +
        Set the repository log region size, in bytes.
        +
      • +
      + + + +
        +
      • +

        getLogRegionSize

        +
        public java.lang.Integer getLogRegionSize()
        +
        Returns the repository log region size, or null if the default + should be selected.
        +
      • +
      + + + +
        +
      • +

        setCachePercent

        +
        public void setCachePercent(int cachePercent)
        +
        Set the percent of JVM heap used by the repository cache. Actual + BDB implementation will select a suitable default if this is not + set. This is overridden by setting an explicit cacheSize.
        +
      • +
      + + + +
        +
      • +

        setCachePercent

        +
        public void setCachePercent(java.lang.Integer cachePercent)
        +
        Set the percent of JVM heap used by the repository cache. Actual + BDB implementation will select a suitable default if this is not + set. This is overridden by setting an explicit cacheSize.
        +
        Parameters:
        cachePercent - percent of JVM heap to use, or null for default
        +
      • +
      + + + +
        +
      • +

        getCachePercent

        +
        public java.lang.Integer getCachePercent()
        +
        Returns the percent of JVM heap used by the repository cache, or + null if default should be selected.
        +
      • +
      + + + +
        +
      • +

        setLockTimeout

        +
        public void setLockTimeout(double lockTimeout)
        +
        Set the lock timeout, in seconds. Default value is 0.5 seconds.
        +
      • +
      + + + +
        +
      • +

        getLockTimeout

        +
        public double getLockTimeout()
        +
        Returns the lock timeout, in seconds.
        +
      • +
      + + + +
        +
      • +

        getLockTimeoutInMicroseconds

        +
        public long getLockTimeoutInMicroseconds()
        +
        Returns the lock timeout, in microseconds, limited to max long value.
        +
      • +
      + + + +
        +
      • +

        setMaxLocks

        +
        public void setMaxLocks(java.lang.Integer max)
        +
      • +
      + + + +
        +
      • +

        getMaxLocks

        +
        public java.lang.Integer getMaxLocks()
        +
      • +
      + + + +
        +
      • +

        setTransactionTimeout

        +
        public void setTransactionTimeout(double txnTimeout)
        +
        Set the transaction timeout, in seconds. Default value is 300 seconds.
        +
      • +
      + + + +
        +
      • +

        getTransactionTimeout

        +
        public double getTransactionTimeout()
        +
        Returns the repository transaction timeout, in seconds.
        +
      • +
      + + + +
        +
      • +

        getTransactionTimeoutInMicroseconds

        +
        public long getTransactionTimeoutInMicroseconds()
        +
        Returns the repository transaction timeout, in microseconds, limited to + max long value.
        +
      • +
      + + + +
        +
      • +

        setTransactionNoSync

        +
        public void setTransactionNoSync(boolean noSync)
        +
        When true, commits are not immediately written or flushed to disk. This + improves performance, but there is a chance of losing the most recent + commits if the process is killed or if the machine crashes.
        +
      • +
      + + + +
        +
      • +

        getTransactionNoSync

        +
        public boolean getTransactionNoSync()
        +
        Returns true if transactions are not written or flushed to disk.
        +
      • +
      + + + +
        +
      • +

        setTransactionWriteNoSync

        +
        public void setTransactionWriteNoSync(boolean noSync)
        +
        When true, commits are written, but they are not flushed to disk. This + improves performance, but there is a chance of losing the most recent + commits if the machine crashes.
        +
      • +
      + + + +
        +
      • +

        getTransactionWriteNoSync

        +
        public boolean getTransactionWriteNoSync()
        +
        Returns true if transactions are not flushed to disk.
        +
      • +
      + + + +
        +
      • +

        setTransactionMaxActive

        +
        public void setTransactionMaxActive(java.lang.Integer max)
        +
        Set the maximum number of concurrent transactions, or pass null to use + the default. This setting has no effect for BDB-JE.
        +
      • +
      + + + +
        +
      • +

        getTransactionMaxActive

        +
        public java.lang.Integer getTransactionMaxActive()
        +
        Returns the maximum number of concurrent transactions, or null if the + default is used.
        +
      • +
      + + + +
        +
      • +

        setDatabasesTransactional

        +
        public void setDatabasesTransactional(java.lang.Boolean transactional)
        +
        When true, allows databases to be transactional. This setting affects + the databases, not the environment. If this is not explicitly set, the + environment getTransactional is used.
        +
      • +
      + + + +
        +
      • +

        getDatabasesTransactional

        +
        public java.lang.Boolean getDatabasesTransactional()
        +
        Returns true if the databases are configured to be transactional, + false if configured to not be transactional, null if this override was never set
        +
      • +
      + + + +
        +
      • +

        setReverseSplitOff

        +
        public void setReverseSplitOff(boolean off)
        +
        Pass true to disable reverse split of B-tree nodes to reduce deadlocks. + This setting has no effect for BDB-JE.
        +
      • +
      + + + +
        +
      • +

        isReverseSplitOff

        +
        public boolean isReverseSplitOff()
        +
      • +
      + + + +
        +
      • +

        setDatabasePageSize

        +
        public void setDatabasePageSize(java.lang.Integer bytes,
        +                       java.lang.Class<? extends Storable> type)
        +
        Sets the desired page size for a given type. If not specified, the page + size applies to all types.
        +
      • +
      + + + +
        +
      • +

        setPrivate

        +
        public void setPrivate(boolean b)
        +
        When true, BDB environment cannot be shared by other processes, and + region files are not created. By default, environment is shared, if + supported.
        +
      • +
      + + + +
        +
      • +

        isPrivate

        +
        public boolean isPrivate()
        +
        Returns true if BDB environment is private. By default, environment is + shared, if supported.
        +
      • +
      + + + +
        +
      • +

        setMultiversion

        +
        public void setMultiversion(boolean multiversion)
        +
        Set true to enable multiversion concurrency control (MVCC) on BDB + environment. This enables snapshot isolation, and is it is not supported + by all BDB products and versions.
        +
      • +
      + + + +
        +
      • +

        isMultiversion

        +
        public boolean isMultiversion()
        +
        Returns false by default because multiversion concurrency control (MVCC) + is not enabled.
        +
      • +
      + + + +
        +
      • +

        setLogInMemory

        +
        public void setLogInMemory(boolean logInMemory)
        +
        Set true to store transaction logs in memory only instead of persistent + storage. For BDB products which are entirely log based, no records are + ever persisted.
        +
      • +
      + + + +
        +
      • +

        getLogInMemory

        +
        public boolean getLogInMemory()
        +
        Returns false by default, indicating that transaction logs are persisted.
        +
      • +
      + + + +
        +
      • +

        setLogFileMaxSize

        +
        public void setLogFileMaxSize(java.lang.Integer sizeInBytes)
        +
        Set the maximum transaction log file size for the BDB environment.
        +
      • +
      + + + +
        +
      • +

        getLogFileMaxSize

        +
        public java.lang.Integer getLogFileMaxSize()
        +
        Returns null if default size will be used.
        +
      • +
      + + + +
        +
      • +

        setInitializeLogging

        +
        public void setInitializeLogging(boolean b)
        +
        Ensure the transaction logging sub-system is initialized, which is + usually implied.
        +
      • +
      + + + +
        +
      • +

        getInitializeLogging

        +
        public boolean getInitializeLogging()
        +
      • +
      + + + +
        +
      • +

        setRunFullRecovery

        +
        public void setRunFullRecovery(boolean runRecovery)
        +
        Pass true to override the default and run a full (catastrophic) recovery + when environment is opened. This setting has no effect for BDB-JE.
        +
      • +
      + + + +
        +
      • +

        getRunFullRecovery

        +
        public boolean getRunFullRecovery()
        +
        Returns true if a full (catastrophic) recovery should be performed when + environment is opened.
        +
      • +
      + + + +
        +
      • +

        setRunCheckpointer

        +
        public void setRunCheckpointer(boolean runCheckpointer)
        +
        Disable automatic checkpointing of database if another process is + responsible for that. The false setting is implied for read-only + databases.
        +
      • +
      + + + +
        +
      • +

        getRunCheckpointer

        +
        public boolean getRunCheckpointer()
        +
        Returns true if checkpointer is run automatically.
        +
      • +
      + + + +
        +
      • +

        setCheckpointInterval

        +
        public void setCheckpointInterval(int intervalMillis)
        +
        Set the interval to run checkpoints. This setting is ignored if the + checkpointer is not configured to run.
        +
        Parameters:
        intervalMillis - interval between checkpoints, in milliseconds
        +
      • +
      + + + +
        +
      • +

        getCheckpointInterval

        +
        public int getCheckpointInterval()
        +
        Returns:
        interval between checkpoints, in milliseconds
        +
      • +
      + + + +
        +
      • +

        setCheckpointThresholdKB

        +
        public void setCheckpointThresholdKB(int thresholdKB)
        +
        Set the size threshold to run checkpoints. This setting is ignored if + the checkpointer is not configured to run. Default value is 1024 KB. + +

        Checkpoint threshold is only used by Carbonado's built-in + checkpointer, and is ignored when using BDB-JE.

        +
        Parameters:
        thresholdKB - run checkpoint if at least this many kilobytes in log
        +
      • +
      + + + +
        +
      • +

        getCheckpointThresholdKB

        +
        public int getCheckpointThresholdKB()
        +
        Returns:
        run checkpoint if at least this many kilobytes in log
        +
      • +
      + + + +
        +
      • +

        setCheckpointThresholdMinutes

        +
        public void setCheckpointThresholdMinutes(int thresholdMinutes)
        +
        Set the time threshold to run checkpoints. This setting is ignored if + the checkpointer is not configured to run. Default value is 1 minute. + +

        Checkpoint threshold is only used by Carbonado's built-in + checkpointer, and is ignored when using BDB-JE.

        +
        Parameters:
        thresholdMinutes - run checkpoint if at least this many minutes + passed since last checkpoint
        +
      • +
      + + + +
        +
      • +

        getCheckpointThresholdMinutes

        +
        public int getCheckpointThresholdMinutes()
        +
        Returns:
        run checkpoint if at least this many minutes passed since last + checkpoint
        +
      • +
      + + + +
        +
      • +

        setKeepOldLogFiles

        +
        public void setKeepOldLogFiles(boolean keep)
        +
        By default, transaction log files are deleted when no longer needed. + Keeping log files can be used for incremental backups or for diagnosing + problems. If using BDB-JE, old log files are renamed with a ".del" + extension. If using BDB-core, the db_archive utility is required for + identifying old log files.
        +
      • +
      + + + +
        +
      • +

        getKeepOldLogFiles

        +
        public boolean getKeepOldLogFiles()
        +
        Returns false by default.
        +
      • +
      + + + +
        +
      • +

        setRunDeadlockDetector

        +
        public void setRunDeadlockDetector(boolean runDeadlockDetector)
        +
        Disable automatic deadlock detection of database if another thread is + responsible for that.
        +
      • +
      + + + +
        +
      • +

        getRunDeadlockDetector

        +
        public boolean getRunDeadlockDetector()
        +
        Returns true if deadlock detector is configured to run.
        +
      • +
      + + + +
        +
      • +

        setLockConflictDeadlockDetectMode

        +
        public void setLockConflictDeadlockDetectMode(boolean b)
        +
        Enable deadlock detection whenever a lock conflict occurs. Default is + off, and it has no effect for BDB-JE.
        +
      • +
      + + + +
        +
      • +

        getLockConflictDeadlockDetectMode

        +
        public boolean getLockConflictDeadlockDetectMode()
        +
        Returns true if deadlock detection is run whenever a lock conflict occurs.
        +
      • +
      + + + +
        +
      • +

        setChecksumEnabled

        +
        public void setChecksumEnabled(java.lang.Boolean checksumEnabled)
        +
        When true, enable checksum verification of pages read into the cache + from the backing filestore. By default checksum is enabled for BDB-JE, + and disabled for BDB-C.
        +
      • +
      + + + +
        +
      • +

        getChecksumEnabled

        +
        public java.lang.Boolean getChecksumEnabled()
        +
        Returns true if checksum verification is enabled. Returns null if the + BDB default is used.
        +
      • +
      + + + +
        +
      • +

        setInitialEnvironmentConfig

        +
        public void setInitialEnvironmentConfig(java.lang.Object envConfig)
        +
        Optionally set the BDB specific environment configuration to + use. The builder will verify that needed configuration values are set.
        +
      • +
      + + + +
        +
      • +

        getInitialEnvironmentConfig

        +
        public java.lang.Object getInitialEnvironmentConfig()
        +
        Returns the optional BDB specific environment configuration to use.
        +
      • +
      + + + +
        +
      • +

        setInitialDatabaseConfig

        +
        public void setInitialDatabaseConfig(java.lang.Object dbConfig)
        +
        Optionally set the BDB specific database configuration to use + for all databases created. The storage will verify that needed + configuration values are set.
        +
      • +
      + + + +
        +
      • +

        getInitialDatabaseConfig

        +
        public java.lang.Object getInitialDatabaseConfig()
        +
        Returns the optional BDB specific database configuration to use + for all databases created.
        +
      • +
      + + + +
        +
      • +

        setStorableCodecFactory

        +
        public void setStorableCodecFactory(StorableCodecFactory factory)
        +
        Override the default storable codec factory.
        +
      • +
      + + + +
        +
      • +

        getStorableCodecFactory

        +
        public StorableCodecFactory getStorableCodecFactory()
        +
        Returns the storable codec factory used.
        +
      • +
      + + + +
        +
      • +

        setPreShutdownHook

        +
        public void setPreShutdownHook(java.lang.Runnable hook)
        +
        Sets a callback to be invoked before the repository has finished running + its own shutdown hooks. This method is also invoked when repository is + manually closed.
        +
      • +
      + + + +
        +
      • +

        getPreShutdownHook

        +
        public java.lang.Runnable getPreShutdownHook()
        +
        Returns the custom shutdown hook that runs before the repository has + finished running its own shutdown hooks, or null if none.
        +
      • +
      + + + +
        +
      • +

        setShutdownHook

        +
        public void setShutdownHook(java.lang.Runnable hook)
        +
        Sets a callback to be invoked after repository has finished running its + own shutdown hooks. This method is also invoked when repository is + manually closed.
        +
      • +
      + + + +
        +
      • +

        getShutdownHook

        +
        public java.lang.Runnable getShutdownHook()
        +
        Returns the custom shutdown hook that runs after the repository has + finished running its own shutdown hooks, or null if none.
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        setCompressor

        +
        public void setCompressor(java.lang.String type,
        +                 java.lang.String compressionType)
        +
        Set the compressor for the given class, overriding a custom StorableCodecFactory.
        +
        Parameters:
        type - Storable to compress.
        compressionType - String representation of type of + compression. Available options are "NONE" for no compression or "GZIP" + for gzip compression
        +
      • +
      + + + +
        +
      • +

        getCompressor

        +
        public java.lang.String getCompressor(java.lang.String type)
        +
        Return the compressor used for the given storable.
        +
        Parameters:
        type - Storable to compress
        +
        Returns:
        String representation of the type of compression used. Available options are "NONE" + for no compression and "GZIP" for gzip compression.
        +
      • +
      + + + +
        +
      • +

        setPanicHandler

        +
        public void setPanicHandler(BDBPanicHandler handler)
        +
        Set the handler to call if the database panics.
        +
        Parameters:
        handler -
        +
      • +
      + + + +
        +
      • +

        getPanicHandler

        +
        public BDBPanicHandler getPanicHandler()
        +
        Return the panic handler to call if the database panics.
        +
        Returns:
        The BDBPanicHandler or null if unset.
        +
      • +
      + + + +
        +
      • +

        errorCheck

        +
        public void errorCheck(java.util.Collection<java.lang.String> messages)
        +                throws ConfigurationException
        +
        Description copied from class: AbstractRepositoryBuilder
        +
        This method is called by assertReady, and subclasses must override to + perform custom checks. Be sure to call super.errorCheck as well.
        +
        +
        Overrides:
        +
        errorCheck in class AbstractRepositoryBuilder
        +
        Parameters:
        messages - add any error messages to this list
        +
        Throws:
        +
        ConfigurationException - if error checking indirectly caused + another exception
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + +

Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.

+ + -- cgit v1.2.3