org.jboss.messaging.core.message
Class SimpleMessageReference

java.lang.Object
  extended byorg.jboss.messaging.core.message.SimpleMessageReference
All Implemented Interfaces:
MessageReference

public class SimpleMessageReference
extends java.lang.Object
implements MessageReference

A Simple MessageReference implementation. Note that we do not need WeakReferences to message/holder objects since with the new lazy loading schema we guarantee that if a message ref is in memory - it's corresponding message is in memory too

Version:
1.3 SimpleMessageReference.java,v 1.3 2006/02/23 17:45:57 timfox Exp
Author:
Field Summary
protected  MessageStore ms
           
 
Constructor Summary
  SimpleMessageReference()
          Required by externalization.
protected SimpleMessageReference(org.jboss.messaging.core.message.MessageHolder holder, MessageStore ms)
           
  SimpleMessageReference(SimpleMessageReference other)
           
 
Method Summary
 MessageReference copy()
           
 int getDeliveryCount()
           
 int getInMemoryChannelCount()
           
 Message getMessage()
           
 long getPagingOrder()
           
 long getScheduledDeliveryTime()
           
 boolean isReference()
           
 void releaseMemoryReference()
           
 void setDeliveryCount(int deliveryCount)
           
 void setPagingOrder(long order)
           
 void setScheduledDeliveryTime(long scheduledDeliveryTime)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ms

protected transient MessageStore ms
Constructor Detail

SimpleMessageReference

public SimpleMessageReference()
Required by externalization.


SimpleMessageReference

public SimpleMessageReference(SimpleMessageReference other)

SimpleMessageReference

protected SimpleMessageReference(org.jboss.messaging.core.message.MessageHolder holder,
                                 MessageStore ms)
Method Detail

isReference

public boolean isReference()

getDeliveryCount

public int getDeliveryCount()
Specified by:
getDeliveryCount in interface MessageReference
Returns:
the number of times delivery has been attempted for this routable

setDeliveryCount

public void setDeliveryCount(int deliveryCount)
Specified by:
setDeliveryCount in interface MessageReference

getScheduledDeliveryTime

public long getScheduledDeliveryTime()
Specified by:
getScheduledDeliveryTime in interface MessageReference
Returns:
The time in the future that delivery will be delayed until, or zero if no scheduled delivery will occur

setScheduledDeliveryTime

public void setScheduledDeliveryTime(long scheduledDeliveryTime)
Specified by:
setScheduledDeliveryTime in interface MessageReference

getMessage

public Message getMessage()
Specified by:
getMessage in interface MessageReference

releaseMemoryReference

public void releaseMemoryReference()
Specified by:
releaseMemoryReference in interface MessageReference

getInMemoryChannelCount

public int getInMemoryChannelCount()

getPagingOrder

public long getPagingOrder()
Specified by:
getPagingOrder in interface MessageReference

setPagingOrder

public void setPagingOrder(long order)
Specified by:
setPagingOrder in interface MessageReference

copy

public MessageReference copy()
Specified by:
copy in interface MessageReference

toString

public java.lang.String toString()


Copyright © 2006 JBoss Inc. All Rights Reserved.