public final class ConstrainableLandlordLease extends LandlordLease implements RemoteMethodControl
LandlordLease.
Instances of this class can be verified using the
LandlordProxyVerifier class.LandlordProxyVerifier,
Serialized Formexpiration, serialFormat| Constructor and Description |
|---|
ConstrainableLandlordLease(Uuid cookie,
Landlord landlord,
Uuid landlordUuid,
long expiration,
MethodConstraints methodConstraints)
Create a new
ConstrainableLandlordLease. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBatch(Lease lease) |
LeaseMap |
createLeaseMap(long duration) |
boolean |
equals(Object o) |
MethodConstraints |
getConstraints() |
int |
hashCode() |
RemoteMethodControl |
setConstraints(MethodConstraints constraints) |
cancel, doRenew, getProxy, getReferentUuid, identity, toStringgetExpiration, getSerialFormat, renew, setSerialFormatpublic ConstrainableLandlordLease(Uuid cookie, Landlord landlord, Uuid landlordUuid, long expiration, MethodConstraints methodConstraints)
ConstrainableLandlordLease.cookie - a Uuid that universally and uniquely
identifies the lease this object is to be a proxy forlandlord - Landlord object that will be used to
communicate renew and cancel requests to the granter
of the lease.landlordUuid - a universally unique id that has been
assigned to the server granting of the lease.
Ideally the Uuid landlord.getUuid would
return if landlord implemented
ReferentUuid. Used to determine when
two leases can be batched together.expiration - The initial expiration time of the lease in
milliseconds since the beginning of the epoch.methodConstraints - the client method constraints to place on
this proxy (may be null).NullPointerException - if landlord,
landlordUuid, or cookie
is null.ClassCastException - if landlord
does not implement RemoteMethodControl.public RemoteMethodControl setConstraints(MethodConstraints constraints)
setConstraints in interface RemoteMethodControlpublic MethodConstraints getConstraints()
getConstraints in interface RemoteMethodControlpublic boolean canBatch(Lease lease)
canBatch in interface LeasecanBatch in class LandlordLeasepublic LeaseMap createLeaseMap(long duration)
createLeaseMap in interface LeasecreateLeaseMap in class LandlordLeasepublic int hashCode()
hashCode in class LandlordLeasepublic boolean equals(Object o)
equals in class LandlordLeaseCopyright © 2016–2018. All rights reserved.