Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/activemq/io/util/MemoryManageable.java


1   
2   package org.activemq.io.util;
3   
4   
5   
6   
7   public interface MemoryManageable {
8   
9       /**
10       * Get an id that can be used to identify the object.
11       * 
12       * @return an object that can be used as an Id for this object.
13       */
14      public abstract Object getMemoryId();
15      
16      /**
17       * Get a hint about how much memory this Packet is consuming
18       *
19       * @return an aproximation of the current memory used by this instance
20       */
21      public abstract int getMemoryUsage();
22  
23      /**
24       * Increment reference count for bounded memory collections
25       *
26       * @return the incremented reference value
27       * @see org.activemq.io.util.MemoryBoundedQueue
28       */
29      public abstract int incrementMemoryReferenceCount();
30  
31      /**
32       * Decrement reference count for bounded memory collections
33       *
34       * @return the decremented reference value
35       * @see org.activemq.io.util.MemoryBoundedQueue
36       */
37      public abstract int decrementMemoryReferenceCount();
38  
39      /**
40       * @return the current reference count for bounded memory collections
41       * @see org.activemq.io.util.MemoryBoundedQueue
42       */
43      public abstract int getMemoryUsageReferenceCount();
44      
45      public abstract int getPriority();
46  
47  }