01: /*
02: * Copyright 2002-2007 the original author or authors.
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: */
16:
17: package org.springframework.core;
18:
19: import java.util.Map;
20:
21: /**
22: * Common interface for a concurrent Map, as exposed by
23: * {@link CollectionFactory#createConcurrentMap}. Mirrors
24: * {@link java.util.concurrent.ConcurrentMap}, allowing to be backed by a
25: * JDK ConcurrentHashMap as well as a backport-concurrent ConcurrentHashMap.
26: *
27: * <p>Check out the {@link java.util.concurrent.ConcurrentMap ConcurrentMap javadoc}
28: * for details on the interface's methods.
29: *
30: * @author Juergen Hoeller
31: * @since 2.5
32: */
33: public interface ConcurrentMap extends Map {
34:
35: Object putIfAbsent(Object key, Object value);
36:
37: boolean remove(Object key, Object value);
38:
39: boolean replace(Object key, Object oldValue, Object newValue);
40:
41: Object replace(Object key, Object value);
42:
43: }
|