git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1153425 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2011-08-03 10:53:12 +00:00
parent bf59b7d70f
commit 4798cea181
3 changed files with 14 additions and 9 deletions

View File

@ -82,7 +82,7 @@ public interface MapContainer<K, V> extends Map<K, V> {
* @param key * @param key
* @return true if the container contains the key * @return true if the container contains the key
*/ */
boolean containsKey(K key); boolean containsKey(Object key);
/** /**
* Get the value associated with the key * Get the value associated with the key
@ -90,20 +90,20 @@ public interface MapContainer<K, V> extends Map<K, V> {
* @param key * @param key
* @return the value associated with the key from the store * @return the value associated with the key from the store
*/ */
V get(K key); V get(Object key);
/** /**
* @param o * @param o
* @return true if the MapContainer contains the value o * @return true if the MapContainer contains the value o
*/ */
boolean containsValue(K o); boolean containsValue(Object o);
/** /**
* Add add entries in the supplied Map * Add add entries in the supplied Map
* *
* @param map * @param map
*/ */
void putAll(Map<K, V> map); void putAll(Map<? extends K, ? extends V> map);
/** /**
* @return a Set of all the keys * @return a Set of all the keys
@ -137,7 +137,7 @@ public interface MapContainer<K, V> extends Map<K, V> {
* @param key * @param key
* @return the old value assocaited with the key or null * @return the old value assocaited with the key or null
*/ */
V remove(K key); V remove(Object key);
/** /**
* empty the container * empty the container

View File

@ -45,7 +45,7 @@ public abstract class Usage<T extends Usage> implements Service {
private int percentUsageMinDelta = 1; private int percentUsageMinDelta = 1;
private final List<UsageListener> listeners = new CopyOnWriteArrayList<UsageListener>(); private final List<UsageListener> listeners = new CopyOnWriteArrayList<UsageListener>();
private final boolean debug = LOG.isDebugEnabled(); private final boolean debug = LOG.isDebugEnabled();
private String name; protected String name;
private float usagePortion = 1.0f; private float usagePortion = 1.0f;
private final List<T> children = new CopyOnWriteArrayList<T>(); private final List<T> children = new CopyOnWriteArrayList<T>();
private final List<Runnable> callbacks = new LinkedList<Runnable>(); private final List<Runnable> callbacks = new LinkedList<Runnable>();
@ -324,14 +324,14 @@ public abstract class Usage<T extends Usage> implements Service {
} }
} }
private void addChild(T child) { protected void addChild(T child) {
children.add(child); children.add(child);
if (started.get()) { if (started.get()) {
child.start(); child.start();
} }
} }
private void removeChild(T child) { protected void removeChild(T child) {
children.remove(child); children.remove(child);
} }

View File

@ -1040,6 +1040,11 @@
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version> <version>2.1.1</version>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins> <plugins>