|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.jini.lease.AbstractLeaseMap
public abstract class AbstractLeaseMap
A base class for implementing LeaseMaps. This class implements all of the Map methods, and ensures keys and values are of the correct type. The subclass is responsible for implementing the actual LeaseMap methods: canContainKey, renewAll, and cancelAll, and serialization of any subclass state.
Field Summary | |
---|---|
protected Map |
map
Map from Lease to Long(duration), where all leases have the same destination. |
Constructor Summary | |
---|---|
protected |
AbstractLeaseMap(Lease lease,
long duration)
Default to using a small HashMap. |
protected |
AbstractLeaseMap(Map map)
Provide a map of your choice. |
protected |
AbstractLeaseMap(Map map,
Lease lease,
long duration)
Provide a map of your choice. |
Method Summary | |
---|---|
protected void |
checkKey(Object key)
Check that the key is valid for this map |
protected static void |
checkValue(Object value)
Check that the value is a Long |
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
Set |
entrySet()
|
boolean |
equals(Object o)
|
Object |
get(Object key)
|
int |
hashCode()
|
boolean |
isEmpty()
|
Set |
keySet()
|
Object |
put(Object key,
Object value)
|
void |
putAll(Map m)
|
Object |
remove(Object key)
|
int |
size()
|
Collection |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.jini.core.lease.LeaseMap |
---|
cancelAll, canContainKey, renewAll |
Field Detail |
---|
protected final Map map
Constructor Detail |
---|
protected AbstractLeaseMap(Map map)
protected AbstractLeaseMap(Lease lease, long duration)
protected AbstractLeaseMap(Map map, Lease lease, long duration)
Method Detail |
---|
protected void checkKey(Object key)
protected static void checkValue(Object value)
public int size()
size
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public boolean containsKey(Object key)
containsKey
in interface Map
public boolean containsValue(Object value)
containsValue
in interface Map
public Object get(Object key)
get
in interface Map
public Object put(Object key, Object value)
put
in interface Map
public Object remove(Object key)
remove
in interface Map
public void putAll(Map m)
putAll
in interface Map
public void clear()
clear
in interface Map
public Set keySet()
keySet
in interface Map
public Collection values()
values
in interface Map
public Set entrySet()
entrySet
in interface Map
public boolean equals(Object o)
equals
in interface Map
equals
in class Object
public int hashCode()
hashCode
in interface Map
hashCode
in class Object
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |