GigaSpaces XAP 9.7.2 API

com.sun.jini.landlord
Class LandlordUtil

java.lang.Object
  extended by com.sun.jini.landlord.LandlordUtil

public class LandlordUtil
extends Object

Static methods useful for implementing landlords.

Since:
2.0
Author:
Sun Microsystems, Inc.

Constructor Summary
LandlordUtil()
           
 
Method Summary
static Map cancelAll(LocalLandlord landlord, Uuid[] cookies)
          Call landlord.cancel() for each object in cookies[], passing cookies[i].
static Landlord.RenewResults renewAll(LocalLandlord landlord, Uuid[] cookies, long[] durations)
          Call landlord.renew() for each object in cookie[], passing cookie[i] and durations[i].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LandlordUtil

public LandlordUtil()
Method Detail

renewAll

public static Landlord.RenewResults renewAll(LocalLandlord landlord,
                                             Uuid[] cookies,
                                             long[] durations)
Call landlord.renew() for each object in cookie[], passing cookie[i] and durations[i]. Gather the results and exceptions into a RenewResults object.

Parameters:
landlord - A grantor of leases.
cookies - an array of Uuids, each uniquely and universally identifying a lease
durations - an array of longs, each representing a duration in milliseconds that the client wants the lease associated with the object from the corresponding element of cookies renewed for.
Returns:
A RenewResults object that contains the new duration of each lease that was successfully renewed or the exception encountered for each lease that could not be renewed.

cancelAll

public static Map cancelAll(LocalLandlord landlord,
                            Uuid[] cookies)
Call landlord.cancel() for each object in cookies[], passing cookies[i].

Parameters:
landlord - a grantor of leases
cookies - an array of Uuids, each uniquely and universally identifying a lease
Returns:
If no exceptions are encountered, return null, otherwise, return a Map that for each failed cancel() call maps the passed cookie object to the exception that was generated

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.