org.activemq.service.boundedvm
Class DurableMessagePointer

java.lang.Object
  extended by org.activemq.service.boundedvm.DurableMessagePointer
All Implemented Interfaces:
MemoryManageable

public class DurableMessagePointer
extends Object
implements MemoryManageable

DurableMessagePointers are moved around in the DurableQueueBoundedMessageManager so that we remember the associated messageStore that the message has been persisted to.

Version:
$Revision: 1.1.1.1 $

Constructor Summary
DurableMessagePointer(MessageStore messageStore, ActiveMQDestination destination, ActiveMQMessage message)
           
 
Method Summary
 int decrementMemoryReferenceCount()
          Decrement reference count for bounded memory collections
 Object getMemoryId()
          Get an id that can be used to identify the object.
 int getMemoryUsage()
          Get a hint about how much memory this Packet is consuming
 int getMemoryUsageReferenceCount()
           
 ActiveMQMessage getMessage()
           
 MessageStore getMessageStore()
           
 int getPriority()
           
 int incrementDeliveryCount()
           
 int incrementMemoryReferenceCount()
          Increment reference count for bounded memory collections
 int incrementRedeliveryCount()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DurableMessagePointer

public DurableMessagePointer(MessageStore messageStore,
                             ActiveMQDestination destination,
                             ActiveMQMessage message)
Method Detail

getMessage

public ActiveMQMessage getMessage()

getMemoryId

public Object getMemoryId()
Description copied from interface: MemoryManageable
Get an id that can be used to identify the object.

Specified by:
getMemoryId in interface MemoryManageable
Returns:
an object that can be used as an Id for this object.

getMemoryUsage

public int getMemoryUsage()
Description copied from interface: MemoryManageable
Get a hint about how much memory this Packet is consuming

Specified by:
getMemoryUsage in interface MemoryManageable
Returns:
an aproximation of the current memory used by this instance

incrementMemoryReferenceCount

public int incrementMemoryReferenceCount()
Description copied from interface: MemoryManageable
Increment reference count for bounded memory collections

Specified by:
incrementMemoryReferenceCount in interface MemoryManageable
Returns:
the incremented reference value
See Also:
MemoryBoundedQueue

decrementMemoryReferenceCount

public int decrementMemoryReferenceCount()
Description copied from interface: MemoryManageable
Decrement reference count for bounded memory collections

Specified by:
decrementMemoryReferenceCount in interface MemoryManageable
Returns:
the decremented reference value
See Also:
MemoryBoundedQueue

getMemoryUsageReferenceCount

public int getMemoryUsageReferenceCount()
Specified by:
getMemoryUsageReferenceCount in interface MemoryManageable
Returns:
the current reference count for bounded memory collections
See Also:
MemoryBoundedQueue

incrementDeliveryCount

public int incrementDeliveryCount()
                           throws JMSException
Throws:
JMSException

incrementRedeliveryCount

public int incrementRedeliveryCount()
                             throws JMSException
Throws:
JMSException

getMessageStore

public MessageStore getMessageStore()
Returns:
Returns the messageStore.

toString

public String toString()
Overrides:
toString in class Object

getPriority

public int getPriority()
Specified by:
getPriority in interface MemoryManageable


Copyright © 2004-2009 Protique, Ltd.. All Rights Reserved.