public class AnySharedMapImpl extends Object implements SharedMap
RmiSharedMapImpl).| Constructor and Description |
|---|
AnySharedMapImpl(String name,
int type)
Create a facade with the specified name and transport type.
|
| Modifier and Type | Method and Description |
|---|---|
static SharedMap |
bind(String name,
int type)
Binds a shared map in the location appropriate to the transport type
(rmiregistry for RMI).
|
void |
clear()
Implements
SharedMap.clear(). |
boolean |
containsKey(Object key)
Implements
SharedMap.containsKey(Object). |
boolean |
containsValue(Object value)
Implements
SharedMap.containsValue(Object). |
Object |
get(Object key)
Implements
SharedMap.get(Object). |
Map |
getMap()
Implements
SharedMap.getMap(). |
Object |
getRandomKey()
Implements
SharedMap.getRandomKey(). |
boolean |
isEmpty()
Implements
SharedMap.isEmpty(). |
static SharedMap |
lookup(String name,
int type)
Looks up the shared map in the location appropriate to the transport type
(rmiregistry for RMI).
|
Object |
put(Object key,
Object value)
Implements
SharedMap.put(Object, Object). |
void |
putAll(Map t)
Implements
SharedMap.putAll(Map). |
long |
putIfLarger(Object key,
long value)
Implements
SharedMap.putIfLarger(Object, long). |
long |
putIfSmaller(Object key,
long value)
Implements
SharedMap.putIfSmaller(Object, long). |
Object |
remove(Object key)
Implements
SharedMap.remove(Object). |
boolean |
replace(Object key,
Object expectedValue,
Object newValue)
|
protected void |
setRmiMap(RmiSharedMap rmim) |
int |
size()
Implements
SharedMap.size(). |
public AnySharedMapImpl(String name, int type)
name - the name of the map.type - the transport type of the map.protected void setRmiMap(RmiSharedMap rmim)
public static SharedMap bind(String name, int type)
public static SharedMap lookup(String name, int type)
null if not there.public int size()
SharedMap.size().public boolean isEmpty()
SharedMap.isEmpty().public boolean containsKey(Object key)
SharedMap.containsKey(Object).containsKey in interface SharedMappublic boolean containsValue(Object value)
SharedMap.containsValue(Object).containsValue in interface SharedMappublic Object get(Object key)
SharedMap.get(Object).public Object put(Object key, Object value)
SharedMap.put(Object, Object).public long putIfLarger(Object key, long value)
SharedMap.putIfLarger(Object, long).putIfLarger in interface SharedMappublic long putIfSmaller(Object key, long value)
SharedMap.putIfSmaller(Object, long).putIfSmaller in interface SharedMappublic Object remove(Object key)
SharedMap.remove(Object).public void putAll(Map t)
SharedMap.putAll(Map).public void clear()
SharedMap.clear().public Map getMap()
SharedMap.getMap().public Object getRandomKey()
SharedMap.getRandomKey().getRandomKey in interface SharedMappublic boolean replace(Object key, Object expectedValue, Object newValue)
replace in interface SharedMapkey - The key of the mappingexpectedValue - The value that we expect the mapping to havenewValue - The new value put into the mapping if the current value
equals expectedValue.true if newValue was placed
into the map.
author David WhitlockCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.