public class LeaseFactory extends Object
LandlordLease instances.| Constructor and Description |
|---|
LeaseFactory(Landlord landlord,
Uuid landlordUuid)
Create a new
LeaseFactory that will create LandlordLeases with the
specified Landlord and landlord Uuid. |
| Modifier and Type | Method and Description |
|---|---|
TrustVerifier |
getVerifier()
Return a
TrustVerifier that will verify the proxies produced by this factory. |
LandlordLease |
newLease(Uuid cookie,
long expiration)
Return a new
LandlordLease with the specified initial expiration and cookie
using the inner proxy and Uuid the factory was created with. |
LandlordLease |
newTransactionLease(Uuid cookie,
long expiration)
Return a new
MahaloTxnLease with the specified initial expiration and cookie
using the inner proxy and Uuid the factory was created with. |
public LeaseFactory(Landlord landlord, Uuid landlordUuid)
LeaseFactory that will create LandlordLeases with the
specified Landlord and landlord Uuid.landlord - the inner proxy that the leases will use to communicate back to the
server.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.NullPointerException - if either argument is nullpublic LandlordLease newLease(Uuid cookie, long expiration)
LandlordLease with the specified initial expiration and cookie
using the inner proxy and Uuid the factory was created with. Will return a
ConstrainableLandlordLease if inner proxy this factory was created with implements
RemoteMethodControl.cookie - a Uuid that will universally and uniquely identify the leaseexpiration - the initial expiration time of the lease.LandlordLease.NullPointerException - if the cookie argument is null.public LandlordLease newTransactionLease(Uuid cookie, long expiration)
MahaloTxnLease with the specified initial expiration and cookie
using the inner proxy and Uuid the factory was created with. Will return a
ConstrainableLandlordLease if inner proxy this factory was created with implements
RemoteMethodControl.cookie - a Uuid that will universally and uniquely identify the leaseexpiration - the initial expiration time of the lease.LandlordLease.NullPointerException - if the cookie argument is null.public TrustVerifier getVerifier()
TrustVerifier that will verify the proxies produced by this factory.
Currently the verifier returned will be an instance of LandlordProxyVerifier.TrustVerifier.UnsupportedOperationException - if the Landlord this factory was created with
does not implement both RemoteMethodControl and
TrustEquivalence.Copyright © GigaSpaces.