|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.resources.servicecore.ResourceLessor
org.rioproject.resources.servicecore.LandlordLessor
public class LandlordLessor
The LandlordLessor manages leased resources using the Landlord protocol.
The LandlordLessor supports the following configuration entries; where each
configuration entry name is associated with the component name org.rioproject.resources.servicecore
| Type: | Exporter |
| Default: | A new BasicJeriExporter with
|
| Description: | Specifies the Exporter to use to export this service. This entry is obtained at service start and restart. |
| Type: | LeasePeriodPolicy |
| Default: | A new
FixedLeasePeriodPolicy that allows
leases up to one day, and grants one hour leases for duration requests of
Lease.ANY
|
| Description: | Policy used to determine the length of initial grants and renewals of the leases on entries. Obtained at service start and restart. |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.rioproject.resources.servicecore.ResourceLessor |
|---|
ResourceLessor.LeaseReaper |
| Nested classes/interfaces inherited from interface com.sun.jini.landlord.Landlord |
|---|
Landlord.RenewResults |
| Field Summary | |
|---|---|
static long |
DEFAULT_LEASE_TIME
The default time for a Lease: 1 hour |
static long |
DEFAULT_MAX_LEASE_TIME
The maximum time for a Lease: 1 day |
| Constructor Summary | |
|---|---|
LandlordLessor(Configuration config)
Create a LandlordLessor |
|
LandlordLessor(Configuration config,
LeasePeriodPolicy leasePolicy)
Create a LandlordLessor |
|
| Method Summary | |
|---|---|
void |
cancel(Uuid cookie)
Called by the lease when its cancel method is called. |
Map |
cancelAll(Uuid[] cookies)
Called by the lease map when its cancelAll method is
called. |
TrustVerifier |
getProxyVerifier()
|
Uuid |
getReferentUuid()
Return the Uuid that has been assigned to the resource this
proxy represents. |
Lease |
newLease(LeasedResource resource,
long duration)
Concrete implementation of parent class |
long |
renew(Uuid cookie,
long extension)
Called by the lease when its renew method is called. |
Landlord.RenewResults |
renewAll(Uuid[] cookie,
long[] extension)
Called by the lease map when its renewAll method is
called. |
boolean |
stop(boolean force)
Stop the LandlordLessor |
| Methods inherited from class org.rioproject.resources.servicecore.ResourceLessor |
|---|
addLeasedResource, addLeaseListener, currentTime, ensure, getLeasedResource, getLeasedResources, notifyLeaseExpiration, notifyLeaseRegistration, notifyLeaseRemoval, notifyLeaseRenewal, remove, removeAll, removeLeaseListener, stop, total |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long DEFAULT_LEASE_TIME
public static final long DEFAULT_MAX_LEASE_TIME
| Constructor Detail |
|---|
public LandlordLessor(Configuration config)
throws RemoteException
config - The Configuration object used to initialize operational
values.
RemoteException - if errors occur setting up infrastructure
public LandlordLessor(Configuration config,
LeasePeriodPolicy leasePolicy)
throws RemoteException
config - The Configuration object used to initialize operational
values.leasePolicy - A LeasePeriodPolicy object to be used for the
LandlordLessor.
RemoteException - if errors occur setting up infrastructure| Method Detail |
|---|
public boolean stop(boolean force)
force - if true, unexports the LandlordLessor even if there are
pending or in-progress calls; if false, only unexports the LandlordLessor
if there are no pending or in-progress calls
public Lease newLease(LeasedResource resource,
long duration)
throws LeaseDeniedException
newLease in class ResourceLessorresource - to be leasedduration - Time requested for Lease
LeaseDeniedException - If the lease has been deniedResourceLessor.newLease(com.sun.jini.landlord.LeasedResource, long)
public long renew(Uuid cookie,
long extension)
throws LeaseDeniedException,
UnknownLeaseException
renew method is called.
renew in interface Landlordcookie - Associated with the lease when it was createdextension - The duration argument passed to the
Lease.renew() call
LeaseDeniedException
UnknownLeaseException
public Landlord.RenewResults renewAll(Uuid[] cookie,
long[] extension)
renewAll method is
called.
renewAll in interface Landlordcookie - Associated with each lease when it was created extension - The duration argument for each lease from the map
public void cancel(Uuid cookie)
throws UnknownLeaseException
cancel method is called.
cancel in interface Landlordcookie - Associated with the lease when it was created
UnknownLeaseExceptionpublic Map cancelAll(Uuid[] cookies)
cancelAll method is
called.
cancelAll in interface Landlordcookies - Associated with the lease when it was created
public TrustVerifier getProxyVerifier()
throws RemoteException
getProxyVerifier in interface ServerProxyTrustRemoteExceptionpublic Uuid getReferentUuid()
Uuid that has been assigned to the resource this
proxy represents.
getReferentUuid in interface ReferentUuidUuid associated with the resource this proxy
represents. Will not return null.
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||