Package com.sun.jini.landlord
Class LandlordUtil
java.lang.Object
com.sun.jini.landlord.LandlordUtil
Static methods useful for implementing landlords.
- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MapcancelAll(LocalLandlord landlord, Uuid[] cookies) Calllandlord.cancel()for each object incookies[], passingcookies[i].static Landlord.RenewResultsrenewAll(LocalLandlord landlord, Uuid[] cookies, long[] durations) Calllandlord.renew()for each object incookie[], passingcookie[i]anddurations[i].
-
Constructor Details
-
LandlordUtil
public LandlordUtil()
-
-
Method Details
-
renewAll
public static Landlord.RenewResults renewAll(LocalLandlord landlord, Uuid[] cookies, long[] durations) Calllandlord.renew()for each object incookie[], passingcookie[i]anddurations[i]. Gather the results and exceptions into aRenewResultsobject.- Parameters:
landlord- A grantor of leases.cookies- an array ofUuids, each uniquely and universally identifying a leasedurations- an array of longs, each representing a duration in milliseconds that the client wants the lease associated with the object from the corresponding element ofcookiesrenewed for.- Returns:
- A
RenewResultsobject 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
Calllandlord.cancel()for each object incookies[], passingcookies[i].- Parameters:
landlord- a grantor of leasescookies- an array ofUuids, each uniquely and universally identifying a lease- Returns:
- If no exceptions are encountered, return
null, otherwise, return a Map that for each failedcancel()call maps the passed cookie object to the exception that was generated
-