|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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,
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(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 Mappublic boolean isEmpty()
isEmpty in interface Mappublic boolean containsKey(Object key)
containsKey in interface Mappublic boolean containsValue(Object value)
containsValue in interface Mappublic Object get(Object key)
get in interface Map
public Object put(Object key,
Object value)
put in interface Mappublic Object remove(Object key)
remove in interface Mappublic void putAll(Map m)
putAll in interface Mappublic void clear()
clear in interface Mappublic Set keySet()
keySet in interface Mappublic Collection values()
values in interface Mappublic Set entrySet()
entrySet in interface Mappublic boolean equals(Object o)
equals in interface Mapequals in class Objectpublic int hashCode()
hashCode in interface MaphashCode in class Object
|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||