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.jboss.messaging.core.plugin
Class SimpleMessageStore

    java.lang.Object
      ServiceMBeanSupport
          org.jboss.messaging.core.plugin.SimpleMessageStore

All Implemented Interfaces:
  MessageStore, ServerPlugin

public class SimpleMessageStore
extends ServiceMBeanSupport
implements MessageStore

A MessageStore implementation.

Version:
  `$Revision: 1.3 $` $Id: SimpleMessageStore.java,v 1.3 2006/03/23 19:23:58 timfox Exp $
Author:
  Ovidiu Feodorov, Tim Fox
See Also:
  Serialized Form

Constructor Summary
`SimpleMessageStore(java.lang.String storeID)`
`SimpleMessageStore(java.lang.String storeID, boolean acceptReliableMessages)`

Method Summary
`boolean` | `acceptReliableMessages()` A non-recoverable message store cannot guarantee recoverability for reliable messages so by default it won't accept reliable messages.
`protected org.jboss.messaging.core.plugin.MessageHolder` | `addMessage(Message m)`
`boolean` | `forgetMessage(long messageID)` Remove a message from the store
`java.lang.Object` | `getInstance()` A server plugin will be always accessed via a hard reference, so it is essential that each implementation exposes this method.
`java.io.Serializable` | `getStoreID()`
`boolean` | `isRecoverable()`
`java.util.List` | `messageIds()`
`MessageReference` | `reference(long messageID)` Return a new reference for a message already stored in the store and identified by
`MessageReference` | `reference(Message m)` Message m is stored in the store if it is not already known to the store, then a new MessageReference is returned for the Message
`void` | `setStoreID(java.lang.String storeID)`
`int` | `size()`
`protected void` | `startService()`
`protected void` | `stopService()`
`java.lang.String` | `toString()`

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

Constructor Detail

### SimpleMessageStore

    public SimpleMessageStore(java.lang.String storeID)

Parameters:
  `storeID` - - if more than one message store is to be used in a distributed messaging configuration, each store must have an unique store ID.

### SimpleMessageStore

    public SimpleMessageStore(java.lang.String storeID,
                              boolean acceptReliableMessages)

Parameters:
  `storeID` - - if more than one message store is to be used in a distributed messaging configuration, each store must have an unique store ID.

Method Detail

### startService

    protected void startService()
                         throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### stopService

    protected void stopService()
                        throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### getInstance

    public java.lang.Object getInstance()

  Description copied from interface: `ServerPlugin`
  A server plugin will be always accessed via a hard reference, so it is essential that each implementation exposes this method.

  Specified by:
    `getInstance` in interface `ServerPlugin`

### getStoreID

    public java.io.Serializable getStoreID()

  Specified by:
    `getStoreID` in interface `MessageStore`

### isRecoverable

    public boolean isRecoverable()

  Specified by:
    `isRecoverable` in interface `MessageStore`

### acceptReliableMessages

    public boolean acceptReliableMessages()

  Description copied from interface: `MessageStore`
  A non-recoverable message store cannot guarantee recoverability for reliable messages so by default it won't accept reliable messages. If specifically configured to do so, it must unequivocally indicates that it accepts reliable messages by returning true as result of this method. A recoverable message store must always accept reliable messages, so this method must always return true for a recoverable message store.

  Specified by:
    `acceptReliableMessages` in interface `MessageStore`
  Returns:
    false if the channel doesn't accept reliable messages.

### reference

    public MessageReference reference(Message m)

  Description copied from interface: `MessageStore`
  Message m is stored in the store if it is not already known to the store, then a new MessageReference is returned for the Message

  Specified by:
    `reference` in interface `MessageStore`
  Parameters:
    `m` - The Message for which to create the MessageReference
  Returns:
    The new MessageReference

### reference

    public MessageReference reference(long messageID)

  Description copied from interface: `MessageStore`
  Return a new reference for a message already stored in the store and identified by

  Specified by:
    `reference` in interface `MessageStore`
  Parameters:
    `messageID` -
  Returns:
    The reference or null if the message is not already stored in the store

### forgetMessage

    public boolean forgetMessage(long messageID)

  Description copied from interface: `MessageStore`
  Remove a message from the store

  Specified by:
    `forgetMessage` in interface `MessageStore`
  Parameters:
    `messageID` -
  Returns:

### size

    public int size()

### messageIds

    public java.util.List messageIds()

### setStoreID

    public void setStoreID(java.lang.String storeID)

### toString

    public java.lang.String toString()

### addMessage

    protected org.jboss.messaging.core.plugin.MessageHolder addMessage(Message m)

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 © 2006 JBoss Inc. All Rights Reserved.