Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.activemq.store.bdb
Class BDbPersistenceAdapter

    java.lang.Object
      org.codehaus.activemq.service.impl.PersistenceAdapterSupport
          org.codehaus.activemq.store.bdb.BDbPersistenceAdapter

All Implemented Interfaces:
  PersistenceAdapter, Service

public class BDbPersistenceAdapter
extends PersistenceAdapterSupport

A `PersistenceAdapter` implementation using Berkeley DB Java Edition

Version:
  $Revision: 1.5 $

Constructor Summary
`BDbPersistenceAdapter()`
`BDbPersistenceAdapter(com.sleepycat.je.Environment environment, WireFormat wireFormat)`
`BDbPersistenceAdapter(com.sleepycat.je.Environment environment, WireFormat wireFormat, com.sleepycat.je.DatabaseConfig config, com.sleepycat.je.TransactionConfig transactionConfig)`
`BDbPersistenceAdapter(java.io.File directory)`

Method Summary
`void` | `beginTransaction()` This method starts a transaction on the persistent storage - which is nothing to do with JMS or XA transactions - its purely a mechanism to perform multiple writes to a persistent store in 1 transaction as a performance optimisation.
`static JMSException` | `closeDatabase(com.sleepycat.je.Database db, JMSException firstException)`
`void` | `commitTransaction()` Commit a persistence transaction
`protected com.sleepycat.je.Database` | `createDatabase(java.lang.String name)`
`PreparedTransactionStore` | `createPreparedTransactionStore()` Factory method to create a new persistent prepared transaction store for XA recovery
`MessageStore` | `createQueueMessageStore(java.lang.String destinationName)` Factory method to create a new queue message store with the given destination name
`protected com.sleepycat.je.SecondaryConfig` | `createSecondaryConfig(com.sleepycat.je.SecondaryKeyCreator keyGenerator)`
`protected com.sleepycat.je.SecondaryDatabase` | `createSecondaryDatabase(java.lang.String name, com.sleepycat.je.Database database, com.sleepycat.je.SecondaryConfig secondaryConfig)`
`TopicMessageStore` | `createTopicMessageStore(java.lang.String destinationName)` Factory method to create a new topic message store with the given destination name
`com.sleepycat.je.DatabaseConfig` | `getConfig()`
`java.io.File` | `getDirectory()`
`com.sleepycat.je.Environment` | `getEnvironment()`
`com.sleepycat.je.TransactionConfig` | `getTransactionConfig()`
`WireFormat` | `getWireFormat()`
`static BDbPersistenceAdapter` | `newInstance(java.io.File directory)` Factory method to create an instance using the defaults
`void` | `rollbackTransaction()` Rollback a persistence transaction
`void` | `setConfig(com.sleepycat.je.DatabaseConfig config)`
`void` | `setDirectory(java.io.File directory)`
`void` | `setEnvironment(com.sleepycat.je.Environment environment)`
`void` | `setTransactionConfig(com.sleepycat.je.TransactionConfig transactionConfig)`
`void` | `setWireFormat(WireFormat wireFormat)`
`void` | `start()` Called to start the service
`void` | `stop()` Called to shutdown the service

Methods inherited from class org.codehaus.activemq.service.impl.PersistenceAdapterSupport
`createQueueMessageContainer, createTopicMessageContainer`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BDbPersistenceAdapter

    public BDbPersistenceAdapter()

### BDbPersistenceAdapter

    public BDbPersistenceAdapter(java.io.File directory)

### BDbPersistenceAdapter

    public BDbPersistenceAdapter(com.sleepycat.je.Environment environment,
                                 WireFormat wireFormat)

### BDbPersistenceAdapter

    public BDbPersistenceAdapter(com.sleepycat.je.Environment environment,
                                 WireFormat wireFormat,
                                 com.sleepycat.je.DatabaseConfig config,
                                 com.sleepycat.je.TransactionConfig transactionConfig)

Method Detail

### newInstance

    public static BDbPersistenceAdapter newInstance(java.io.File directory)
                                             throws JMSException

  Factory method to create an instance using the defaults

  Parameters:
    `directory` - the directory in which to store the persistent files
  Returns:
  Throws:
    `JMSException`

### createQueueMessageStore

    public MessageStore createQueueMessageStore(java.lang.String destinationName)
                                         throws JMSException

  Description copied from interface: `PersistenceAdapter`
  Factory method to create a new queue message store with the given destination name

  Throws:
    `JMSException`

### createTopicMessageStore

    public TopicMessageStore createTopicMessageStore(java.lang.String destinationName)
                                              throws JMSException

  Description copied from interface: `PersistenceAdapter`
  Factory method to create a new topic message store with the given destination name

  Throws:
    `JMSException`

### createPreparedTransactionStore

    public PreparedTransactionStore createPreparedTransactionStore()
                                                            throws JMSException

  Description copied from interface: `PersistenceAdapter`
  Factory method to create a new persistent prepared transaction store for XA recovery

  Throws:
    `JMSException`

### beginTransaction

    public void beginTransaction()
                          throws JMSException

  Description copied from interface: `PersistenceAdapter`
  This method starts a transaction on the persistent storage - which is nothing to do with JMS or XA transactions - its purely a mechanism to perform multiple writes to a persistent store in 1 transaction as a performance optimisation.

  Typically one transaction will require one disk synchronization point and so for real high performance its usually faster to perform many writes within the same transaction to minimise latency caused by disk synchronization. This is especially true when using tools like Berkeley Db or embedded JDBC servers.

  Throws:
    `JMSException`

### commitTransaction

    public void commitTransaction()
                           throws JMSException

  Description copied from interface: `PersistenceAdapter`
  Commit a persistence transaction

  Throws:
    `JMSException`
  See Also:
    `PersistenceAdapter.beginTransaction()`

### rollbackTransaction

    public void rollbackTransaction()

  Description copied from interface: `PersistenceAdapter`
  Rollback a persistence transaction

  See Also:
    `PersistenceAdapter.beginTransaction()`

### start

    public void start()
               throws JMSException

  Description copied from interface: `Service`
  Called to start the service

  Throws:
    `JMSException`

### stop

    public void stop()
              throws JMSException

  Description copied from interface: `Service`
  Called to shutdown the service

  Throws:
    `JMSException`

### getDirectory

    public java.io.File getDirectory()

### setDirectory

    public void setDirectory(java.io.File directory)

### getWireFormat

    public WireFormat getWireFormat()

### setWireFormat

    public void setWireFormat(WireFormat wireFormat)

### getTransactionConfig

    public com.sleepycat.je.TransactionConfig getTransactionConfig()

### setTransactionConfig

    public void setTransactionConfig(com.sleepycat.je.TransactionConfig transactionConfig)

### getEnvironment

    public com.sleepycat.je.Environment getEnvironment()

### setEnvironment

    public void setEnvironment(com.sleepycat.je.Environment environment)

### getConfig

    public com.sleepycat.je.DatabaseConfig getConfig()

### setConfig

    public void setConfig(com.sleepycat.je.DatabaseConfig config)

### createDatabase

    protected com.sleepycat.je.Database createDatabase(java.lang.String name)
                                                throws com.sleepycat.je.DatabaseException

  Throws:
    `com.sleepycat.je.DatabaseException`

### createSecondaryDatabase

    protected com.sleepycat.je.SecondaryDatabase createSecondaryDatabase(java.lang.String name,
                                                                         com.sleepycat.je.Database database,
                                                                         com.sleepycat.je.SecondaryConfig secondaryConfig)
                                                                  throws com.sleepycat.je.DatabaseException

  Throws:
    `com.sleepycat.je.DatabaseException`

### closeDatabase

    public static JMSException closeDatabase(com.sleepycat.je.Database db,
                                             JMSException firstException)

### createSecondaryConfig

    protected com.sleepycat.je.SecondaryConfig createSecondaryConfig(com.sleepycat.je.SecondaryKeyCreator keyGenerator)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Protique, Ltd.. All Rights Reserved.