org.activemq.io.util
Interface MemoryManageable

All Known Implementing Classes:
ActiveMQBytesMessage, ActiveMQMapMessage, ActiveMQMessage, ActiveMQObjectMessage, ActiveMQStreamMessage, ActiveMQTextMessage, DurableMessagePointer

public interface MemoryManageable


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()
           
 int getPriority()
           
 int incrementMemoryReferenceCount()
          Increment reference count for bounded memory collections
 

Method Detail

getMemoryId

Object getMemoryId()
Get an id that can be used to identify the object.

Returns:
an object that can be used as an Id for this object.

getMemoryUsage

int getMemoryUsage()
Get a hint about how much memory this Packet is consuming

Returns:
an aproximation of the current memory used by this instance

incrementMemoryReferenceCount

int incrementMemoryReferenceCount()
Increment reference count for bounded memory collections

Returns:
the incremented reference value
See Also:
MemoryBoundedQueue

decrementMemoryReferenceCount

int decrementMemoryReferenceCount()
Decrement reference count for bounded memory collections

Returns:
the decremented reference value
See Also:
MemoryBoundedQueue

getMemoryUsageReferenceCount

int getMemoryUsageReferenceCount()
Returns:
the current reference count for bounded memory collections
See Also:
MemoryBoundedQueue

getPriority

int getPriority()


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