JdbmMessageStore (ActiveMQ 1.1 API)
Keywords: org.codehaus.activemq.store.jdbm.JdbmMessageStore class

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.jdbm
Class JdbmMessageStore

    java.lang.Object
      org.codehaus.activemq.store.jdbm.JdbmMessageStore

All Implemented Interfaces:
  MessageStore, Service

Direct Known Subclasses:
  JdbmTopicMessageStore

public class JdbmMessageStore
extends Object
implements MessageStore

Version:
  $Revision: 1.4 $

Constructor Summary
`JdbmMessageStore(jdbm.btree.BTree messageTable, jdbm.btree.BTree orderedIndex)`

Method Summary
`MessageIdentity` | `addMessage(ActiveMQMessage message)` Adds a message to the message store
`protected JMSException` | `closeTable(jdbm.btree.BTree table, JMSException firstException)`
`protected Object` | `findSequenceNumber(String messageID)` Finds the sequence number for the given messageID
`protected MessageContainer` | `getContainer()`
`protected long` | `getLastSequenceNumber()`
`ActiveMQMessage` | `getMessage(MessageIdentity identity)` Looks up a message using either the String messageID or the messageNumber.
`protected ActiveMQMessage` | `getMessageBySequenceNumber(Long sequenceNumber)` Looks up the message using the given sequence number
`protected jdbm.btree.BTree` | `getMessageTable()`
`protected jdbm.btree.BTree` | `getOrderedIndex()`
`void` | `recover(QueueMessageContainer container)` Recover any messages to be delivered onto the dispatch queue.
`void` | `removeMessage(MessageIdentity identity, MessageAck ack)`
`void` | `setMessageContainer(MessageContainer container)`
`void` | `start()` Called to start the service
`void` | `stop()` Called to shutdown the service

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

Constructor Detail

### JdbmMessageStore

    public JdbmMessageStore(jdbm.btree.BTree messageTable,
                            jdbm.btree.BTree orderedIndex)

Method Detail

### setMessageContainer

    public void setMessageContainer(MessageContainer container)

### addMessage

    public MessageIdentity addMessage(ActiveMQMessage message)
                               throws JMSException

  Description copied from interface: `MessageStore`
  Adds a message to the message store

  Specified by:
    `addMessage` in interface `MessageStore`
  Throws:
    `JMSException`

### getMessage

    public ActiveMQMessage getMessage(MessageIdentity identity)
                               throws JMSException

  Description copied from interface: `MessageStore`
  Looks up a message using either the String messageID or the messageNumber. Implementations are encouraged to fill in the missing key if its easy to do so.

  Specified by:
    `getMessage` in interface `MessageStore`
  Parameters:
    `identity` - which contains either the messageID or the messageNumber
  Returns:
    the message or null if it does not exist
  Throws:
    `JMSException`

### removeMessage

    public void removeMessage(MessageIdentity identity,
                              MessageAck ack)
                       throws JMSException

  Specified by:
    `removeMessage` in interface `MessageStore`
  Throws:
    `JMSException`

### recover

    public void recover(QueueMessageContainer container)
                 throws JMSException

  Description copied from interface: `MessageStore`
  Recover any messages to be delivered onto the dispatch queue.

  Only called when this store is used for durable queues.

  Specified by:
    `recover` in interface `MessageStore`
  Parameters:
    `container` -
  Throws:
    `JMSException`

### start

    public void start()
               throws JMSException

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

  Specified by:
    `start` in interface `Service`
  Throws:
    `JMSException`

### stop

    public void stop()
              throws JMSException

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

  Specified by:
    `stop` in interface `Service`
  Throws:
    `JMSException`

### getContainer

    protected MessageContainer getContainer()

### getLastSequenceNumber

    protected long getLastSequenceNumber()

### getMessageTable

    protected jdbm.btree.BTree getMessageTable()
                                        throws AlreadyClosedException

  Throws:
    `AlreadyClosedException`

### getOrderedIndex

    protected jdbm.btree.BTree getOrderedIndex()
                                        throws AlreadyClosedException

  Throws:
    `AlreadyClosedException`

### getMessageBySequenceNumber

    protected ActiveMQMessage getMessageBySequenceNumber(Long sequenceNumber)
                                                  throws IOException,
                                                         JMSException

  Looks up the message using the given sequence number

  Throws:
    `IOException`
    `JMSException`

### findSequenceNumber

    protected Object findSequenceNumber(String messageID)
                                 throws IOException,
                                        AlreadyClosedException

  Finds the sequence number for the given messageID

  Parameters:
    `messageID` -
  Returns:
  Throws:
    `IOException`
    `AlreadyClosedException`

### closeTable

    protected JMSException closeTable(jdbm.btree.BTree table,
                                      JMSException firstException)

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.