org.jboss.messaging.core.plugin.contract
Interface MessageStore

All Superinterfaces:
ServerPlugin
All Known Implementing Classes:
SimpleMessageStore

public interface MessageStore
extends ServerPlugin

An interface to a referencing/dereferencing message store.

Version:
$Revision: 764 $ $Id: MessageStore.java 764 2006-03-22 10:23:38Z timfox $
Author:
Ovidiu Feodorov, Tim Fox

Method Summary
 boolean acceptReliableMessages()
          A non-recoverable message store cannot guarantee recoverability for reliable messages so by default it won't accept reliable messages.
 boolean forgetMessage(long messageID)
          Remove a message from the store
 java.io.Serializable getStoreID()
           
 boolean isRecoverable()
           
 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
 
Methods inherited from interface org.jboss.messaging.core.plugin.contract.ServerPlugin
getInstance
 

Method Detail

getStoreID

public java.io.Serializable getStoreID()

isRecoverable

public boolean isRecoverable()

acceptReliableMessages

public boolean acceptReliableMessages()
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.

Returns:
false if the channel doesn't accept reliable messages.

reference

public 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

Parameters:
m - The Message for which to create the MessageReference
Returns:
The new MessageReference

reference

public MessageReference reference(long messageID)
Return a new reference for a message already stored in the store and identified by

Parameters:
messageID -
Returns:
The reference or null if the message is not already stored in the store

forgetMessage

public boolean forgetMessage(long messageID)
Remove a message from the store

Parameters:
messageID -
Returns:


Copyright © 2006 JBoss Inc. All Rights Reserved.