Package com.gigaspaces.internal.lease
Class SpaceLeaseMap
java.lang.Object
com.sun.jini.lease.AbstractLeaseMap
com.gigaspaces.internal.lease.SpaceLeaseMap
A LeaseMap implementation using a space proxy to batch update leases.
- Since:
- 9.7.0
- Author:
- Niv Ingberg
-
Field Summary
Fields inherited from class com.sun.jini.lease.AbstractLeaseMap
map -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels all leases in the LeaseMap.booleancanContainKey(Object key) Returns true if the given object is a Lease which can be renewed and cancelled in a batch with other leases in the map.voidrenewAll()Renews all leases in the LeaseMap, using their current values as the renewal durations.Methods inherited from class com.sun.jini.lease.AbstractLeaseMap
checkKey, checkValue, clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
SpaceLeaseMap
-
-
Method Details
-
canContainKey
Description copied from interface:LeaseMapReturns true if the given object is a Lease which can be renewed and cancelled in a batch with other leases in the map. Whether or not two Lease objects can be batched is an implementation detail determined by the objects.- Parameters:
key- an object that should be a lease- Returns:
- true if the lease can be renewed and cancelled in a a batch with other leases
- See Also:
-
renewAll
Description copied from interface:LeaseMapRenews all leases in the LeaseMap, using their current values as the renewal durations. If all renewals are successful, returns normally. Otherwise, removes all leases that failed to renew from the LeaseMap, and throws LeaseMapException.- Throws:
LeaseMapException
-
cancelAll
Description copied from interface:LeaseMapCancels all leases in the LeaseMap. If all cancels are successful, returns normally (leaving all leases in the map). Otherwise, removes all leases that failed to cancel from the LeaseMap, and throws LeaseMapException.- Throws:
LeaseMapException
-