Class SpaceLeaseMap

java.lang.Object
com.sun.jini.lease.AbstractLeaseMap
com.gigaspaces.internal.lease.SpaceLeaseMap
All Implemented Interfaces:
Map, LeaseMap

public class SpaceLeaseMap extends AbstractLeaseMap
A LeaseMap implementation using a space proxy to batch update leases.
Since:
9.7.0
Author:
Niv Ingberg
  • Constructor Details

    • SpaceLeaseMap

      public SpaceLeaseMap(IDirectSpaceProxy spaceProxy, boolean concurrent)
  • Method Details

    • canContainKey

      public boolean canContainKey(Object key)
      Description copied from interface: LeaseMap
      Returns 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

      public void renewAll() throws LeaseMapException
      Description copied from interface: LeaseMap
      Renews 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

      public void cancelAll() throws LeaseMapException
      Description copied from interface: LeaseMap
      Cancels 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