01: /**
02: * Copyright 2003-2007 Luck Consulting Pty Ltd
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */package net.sf.ehcache.management;
16:
17: import java.util.List;
18:
19: /**
20: * An MBean interface for those attributes and operations we wish to expose on net.sf.ehcache.CacheManager
21: * @author Greg Luck
22: * @version $Id: CacheManagerMBean.java 519 2007-07-27 07:11:45Z gregluck $
23: * @since 1.3
24: */
25: public interface CacheManagerMBean {
26:
27: /**
28: * Gets the status attribute of the Ehcache
29: *
30: * @return The status value, as a String from the Status enum class
31: */
32: public String getStatus();
33:
34: /**
35: * Shuts down the CacheManager.
36: * <p/>
37: * If the shutdown occurs on the singleton, then the singleton is removed, so that if a singleton access method
38: * is called, a new singleton will be created.
39: */
40: public void shutdown();
41:
42: /**
43: * Clears the contents of all caches in the CacheManager, but without
44: * removing any caches.
45: * <p/>
46: * This method is not synchronized. It only guarantees to clear those elements in a cache
47: * at the time that the {@link net.sf.ehcache.Ehcache#removeAll()} mehod on each cache is called.
48: */
49: public void clearAll();
50:
51: /**
52: * Returns a JMX Cache bean
53: *
54: */
55: public Cache getCache(String name);
56:
57: /**
58: * Gets the cache names managed by the CacheManager
59: */
60: public String[] getCacheNames() throws IllegalStateException;
61:
62: /**
63: * Gets a list of caches in this CacheManager
64: * @return a list of JMX Cache objects
65: */
66: public List getCaches();
67: }
|