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.howl
Class HowlPersistenceAdapter

    java.lang.Object
      org.codehaus.activemq.service.impl.PersistenceAdapterSupport
          org.codehaus.activemq.store.howl.HowlPersistenceAdapter

All Implemented Interfaces:
  PersistenceAdapter, Service

public class HowlPersistenceAdapter
extends PersistenceAdapterSupport

An implementation of `PersistenceAdapter` designed for optimal use with Howl as the transaction log and then checkpointing asynchronously on a timeout with some other persistent storage.

Version:
  $Revision: 1.6 $

Constructor Summary
`HowlPersistenceAdapter()`
`HowlPersistenceAdapter(java.io.File directory, PersistenceAdapter longTermPersistence)`

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.
`void` | `commitTransaction()` Commit a persistence transaction
`protected org.objectweb.howl.log.Configuration` | `createConfiguration()`
`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
`TopicMessageStore` | `createTopicMessageStore(java.lang.String destinationName)` Factory method to create a new topic message store with the given destination name
`protected org.objectweb.howl.log.Logger` | `createTransactionLog()`
`java.lang.String` | `getBufferClassName()`
`int` | `getBufferSize()`
`org.objectweb.howl.log.Configuration` | `getConfiguration()`
`java.io.File` | `getDirectory()`
`int` | `getFlushSleepTime()`
`java.lang.String` | `getLogFileDir()`
`java.lang.String` | `getLogFileExt()`
`java.lang.String` | `getLogFileName()`
`PersistenceAdapter` | `getLongTermPersistence()`
`int` | `getMaxBlocksPerFile()`
`int` | `getMaxBuffers()`
`int` | `getMaximumCachedMessagesPerStore()`
`int` | `getMaximumTotalCachedMessages()`
`int` | `getMaxLogFiles()`
`int` | `getMinBuffers()`
`int` | `getThreadsWaitingForceThreshold()`
`org.objectweb.howl.log.Logger` | `getTransactionLog()`
`boolean` | `hasCacheCapacity(HowlMessageStore messageStore)` Return true if a store is allowed to cache a message.
`boolean` | `isChecksumEnabled()`
`static HowlPersistenceAdapter` | `newInstance(java.io.File directory)` Factory method to create an instance using the defaults
`void` | `onMessageRemove(HowlMessageStore messageStore)`
`void` | `rollbackTransaction()` Rollback a persistence transaction
`void` | `setBufferClassName(java.lang.String s)`
`void` | `setBufferSize(int i)`
`void` | `setChecksumEnabled(boolean b)`
`void` | `setConfiguration(org.objectweb.howl.log.Configuration configuration)`
`void` | `setDirectory(java.io.File directory)`
`void` | `setFlushSleepTime(int i)`
`void` | `setLogFileDir(java.lang.String s)`
`void` | `setLogFileExt(java.lang.String s)`
`void` | `setLogFileName(java.lang.String s)`
`void` | `setLongTermPersistence(PersistenceAdapter longTermPersistence)`
`void` | `setMaxBlocksPerFile(int i)`
`void` | `setMaxBuffers(int i)`
`void` | `setMaximumCachedMessagesPerStore(int maximumCachedMessagesPerStore)`
`void` | `setMaximumTotalCachedMessages(int maximumTotalCachedMessages)`
`void` | `setMaxLogFiles(int i)`
`void` | `setMinBuffers(int i)`
`void` | `setThreadsWaitingForceThreshold(int i)`
`void` | `setTransactionLog(org.objectweb.howl.log.Logger transactionLog)`
`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

### HowlPersistenceAdapter

    public HowlPersistenceAdapter()

### HowlPersistenceAdapter

    public HowlPersistenceAdapter(java.io.File directory,
                                  PersistenceAdapter longTermPersistence)

Method Detail

### newInstance

    public static HowlPersistenceAdapter 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`

### hasCacheCapacity

    public boolean hasCacheCapacity(HowlMessageStore messageStore)

  Return true if a store is allowed to cache a message. Called by a store when its about to store a message in its cache.

  Parameters:
    `messageStore` -
  Returns:
    true if the cache is allowed to cache the mesage

### onMessageRemove

    public void onMessageRemove(HowlMessageStore messageStore)

### getLongTermPersistence

    public PersistenceAdapter getLongTermPersistence()

### setLongTermPersistence

    public void setLongTermPersistence(PersistenceAdapter longTermPersistence)

### getMaximumCachedMessagesPerStore

    public int getMaximumCachedMessagesPerStore()

### setMaximumCachedMessagesPerStore

    public void setMaximumCachedMessagesPerStore(int maximumCachedMessagesPerStore)

### getMaximumTotalCachedMessages

    public int getMaximumTotalCachedMessages()

### setMaximumTotalCachedMessages

    public void setMaximumTotalCachedMessages(int maximumTotalCachedMessages)

### getDirectory

    public java.io.File getDirectory()

### setDirectory

    public void setDirectory(java.io.File directory)

### getConfiguration

    public org.objectweb.howl.log.Configuration getConfiguration()
                                                          throws org.objectweb.howl.log.LogConfigurationException,
                                                                 java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setConfiguration

    public void setConfiguration(org.objectweb.howl.log.Configuration configuration)

### getTransactionLog

    public org.objectweb.howl.log.Logger getTransactionLog()

### setTransactionLog

    public void setTransactionLog(org.objectweb.howl.log.Logger transactionLog)

### getBufferClassName

    public java.lang.String getBufferClassName()
                                        throws org.objectweb.howl.log.LogConfigurationException,
                                               java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### getBufferSize

    public int getBufferSize()
                      throws org.objectweb.howl.log.LogConfigurationException,
                             java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### getFlushSleepTime

    public int getFlushSleepTime()
                          throws org.objectweb.howl.log.LogConfigurationException,
                                 java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### getLogFileDir

    public java.lang.String getLogFileDir()
                                   throws org.objectweb.howl.log.LogConfigurationException,
                                          java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### getLogFileExt

    public java.lang.String getLogFileExt()
                                   throws org.objectweb.howl.log.LogConfigurationException,
                                          java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### getLogFileName

    public java.lang.String getLogFileName()
                                    throws org.objectweb.howl.log.LogConfigurationException,
                                           java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### getMaxBlocksPerFile

    public int getMaxBlocksPerFile()
                            throws org.objectweb.howl.log.LogConfigurationException,
                                   java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### getMaxBuffers

    public int getMaxBuffers()
                      throws org.objectweb.howl.log.LogConfigurationException,
                             java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### getMaxLogFiles

    public int getMaxLogFiles()
                       throws org.objectweb.howl.log.LogConfigurationException,
                              java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### getMinBuffers

    public int getMinBuffers()
                      throws org.objectweb.howl.log.LogConfigurationException,
                             java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### getThreadsWaitingForceThreshold

    public int getThreadsWaitingForceThreshold()
                                        throws org.objectweb.howl.log.LogConfigurationException,
                                               java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### isChecksumEnabled

    public boolean isChecksumEnabled()
                              throws org.objectweb.howl.log.LogConfigurationException,
                                     java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setBufferClassName

    public void setBufferClassName(java.lang.String s)
                            throws org.objectweb.howl.log.LogConfigurationException,
                                   java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setBufferSize

    public void setBufferSize(int i)
                       throws org.objectweb.howl.log.LogConfigurationException,
                              java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setChecksumEnabled

    public void setChecksumEnabled(boolean b)
                            throws org.objectweb.howl.log.LogConfigurationException,
                                   java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setFlushSleepTime

    public void setFlushSleepTime(int i)
                           throws org.objectweb.howl.log.LogConfigurationException,
                                  java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setLogFileDir

    public void setLogFileDir(java.lang.String s)
                       throws org.objectweb.howl.log.LogConfigurationException,
                              java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setLogFileExt

    public void setLogFileExt(java.lang.String s)
                       throws org.objectweb.howl.log.LogConfigurationException,
                              java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setLogFileName

    public void setLogFileName(java.lang.String s)
                        throws org.objectweb.howl.log.LogConfigurationException,
                               java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setMaxBlocksPerFile

    public void setMaxBlocksPerFile(int i)
                             throws org.objectweb.howl.log.LogConfigurationException,
                                    java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setMaxBuffers

    public void setMaxBuffers(int i)
                       throws org.objectweb.howl.log.LogConfigurationException,
                              java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setMaxLogFiles

    public void setMaxLogFiles(int i)
                        throws org.objectweb.howl.log.LogConfigurationException,
                               java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setMinBuffers

    public void setMinBuffers(int i)
                       throws org.objectweb.howl.log.LogConfigurationException,
                              java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### setThreadsWaitingForceThreshold

    public void setThreadsWaitingForceThreshold(int i)
                                         throws org.objectweb.howl.log.LogConfigurationException,
                                                java.io.IOException

  Throws:
    `org.objectweb.howl.log.LogConfigurationException`
    `java.io.IOException`

### createTransactionLog

    protected org.objectweb.howl.log.Logger createTransactionLog()
                                                          throws java.io.IOException,
                                                                 org.objectweb.howl.log.LogConfigurationException

  Throws:
    `java.io.IOException`
    `org.objectweb.howl.log.LogConfigurationException`

### createConfiguration

    protected org.objectweb.howl.log.Configuration createConfiguration()
                                                                throws java.io.IOException,
                                                                       org.objectweb.howl.log.LogConfigurationException

  Throws:
    `java.io.IOException`
    `org.objectweb.howl.log.LogConfigurationException`

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.