org.activemq.io.util
Interface MemoryManageable

All Known Implementing Classes:
ActiveMQMessage, 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

public 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

public 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

public int incrementMemoryReferenceCount()
Increment reference count for bounded memory collections

Returns:
the incremented reference value
See Also:
MemoryBoundedQueue

decrementMemoryReferenceCount

public int decrementMemoryReferenceCount()
Decrement reference count for bounded memory collections

Returns:
the decremented reference value
See Also:
MemoryBoundedQueue

getMemoryUsageReferenceCount

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

getPriority

public int getPriority()


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