001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.mq.server;
023:
024: /**
025: * MBean interface.
026: */
027: public interface MessageCacheMBean extends
028: org.jboss.system.ServiceMBean {
029:
030: //default object name
031: public static final javax.management.ObjectName OBJECT_NAME = org.jboss.mx.util.ObjectNameFactory
032: .create("jboss.mq:service=MessageCache");
033:
034: /**
035: * The <code>getInstance</code> method
036: * @return a <code>MessageCache</code> value
037: */
038: org.jboss.mq.server.MessageCache getInstance();
039:
040: /**
041: * Gets the hardRefCacheSize
042: * @return Returns a int
043: */
044: int getHardRefCacheSize();
045:
046: /**
047: * The <code>getSoftenedSize</code> method
048: * @return a <code>long</code> value
049: */
050: long getSoftenedSize();
051:
052: /**
053: * Gets the softRefCacheSize
054: * @return Returns a int
055: */
056: int getSoftRefCacheSize();
057:
058: /**
059: * Gets the totalCacheSize
060: * @return Returns a int
061: */
062: int getTotalCacheSize();
063:
064: /**
065: * Gets the cacheMisses
066: * @return Returns a int
067: */
068: long getCacheMisses();
069:
070: /**
071: * Gets the cacheHits
072: * @return Returns a long
073: */
074: long getCacheHits();
075:
076: /**
077: * Gets whether to make soft references
078: * @return true when making soft references */
079: boolean getMakeSoftReferences();
080:
081: /**
082: * Sets whether to make soft references
083: * @param true to make soft references */
084: void setMakeSoftReferences(boolean makeSoftReferences);
085:
086: /**
087: * Gets the minimum number of hard messages
088: * @return the minimum number of hard messages */
089: int getMinimumHard();
090:
091: /**
092: * Sets the minimum number of hard messages
093: * @param minimumHard the minimum number of hard messages */
094: void setMinimumHard(int minimumHard);
095:
096: /**
097: * Gets the maximum number of hard messages
098: * @return the minimum number of hard messages */
099: int getMaximumHard();
100:
101: /**
102: * Sets the maximum number of hard messages
103: * @param maximumHard the maximum number of hard messages */
104: void setMaximumHard(int maximumHard);
105:
106: /**
107: * Gets the length of time to wait before checking whether we should soften
108: * @return the time to wait */
109: long getSoftenWaitMillis();
110:
111: /**
112: * Sets the length of time to wait before checking whether we should soften
113: * @param millis the time to wait in millis */
114: void setSoftenWaitMillis(long millis);
115:
116: /**
117: * Gets the minimum length between softening checks
118: * @return the time to wait */
119: long getSoftenNoMoreOftenThanMillis();
120:
121: /**
122: * Sets the minimum length between softening checks
123: * @param wait the time between checks */
124: void setSoftenNoMoreOftenThanMillis(long millis);
125:
126: /**
127: * Gets the maximum length between softening checks
128: * @return the time */
129: long getSoftenAtLeastEveryMillis();
130:
131: /**
132: * Sets the minimum length between softening checks
133: * @param wait the time between checks */
134: void setSoftenAtLeastEveryMillis(long millis);
135:
136: /**
137: * Gets the highMemoryMark
138: * @return Returns a long
139: */
140: long getHighMemoryMark();
141:
142: /**
143: * Sets the highMemoryMark
144: * @param highMemoryMark The highMemoryMark to set
145: */
146: void setHighMemoryMark(long highMemoryMark);
147:
148: /**
149: * Gets the maxMemoryMark
150: * @return Returns a long
151: */
152: long getMaxMemoryMark();
153:
154: /**
155: * Sets the maxMemoryMark
156: * @param maxMemoryMark The maxMemoryMark to set
157: */
158: void setMaxMemoryMark(long maxMemoryMark);
159:
160: /**
161: * Gets the CurrentMemoryUsage
162: * @return Returns a long
163: */
164: long getCurrentMemoryUsage();
165:
166: void setCacheStore(javax.management.ObjectName cacheStoreName);
167:
168: /**
169: * The <code>getCacheStore</code> method
170: * @return an <code>ObjectName</code> value
171: */
172: javax.management.ObjectName getCacheStore();
173:
174: }
|