|
GigaSpaces XAP 9.7.2 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jini.lease.AbstractLease
com.sun.jini.landlord.LandlordLease
com.sun.jini.landlord.ConstrainableLandlordLease
public final class ConstrainableLandlordLease
Constrainable sub-class of LandlordLease.
Instances of this class can be verified using the
LandlordProxyVerifier class.
LandlordProxyVerifier,
Serialized Form| Field Summary |
|---|
| Fields inherited from class com.sun.jini.lease.AbstractLease |
|---|
expiration, serialFormat |
| Fields inherited from interface net.jini.core.lease.Lease |
|---|
ABSOLUTE, ANY, DURATION, FOREVER |
| Constructor Summary | |
|---|---|
ConstrainableLandlordLease(Uuid cookie,
Landlord landlord,
Uuid landlordUuid,
long expiration,
MethodConstraints methodConstraints)
Create a new ConstrainableLandlordLease. |
|
| Method Summary | |
|---|---|
boolean |
canBatch(Lease lease)
Returns a boolean indicating whether or not the lease given as a parameter can be batched (placed in the same LeaseMap) with the current lease. |
LeaseMap |
createLeaseMap(long duration)
Creates a Map object that can contain leases whose renewal or cancellation can be batched, and adds the current lease to that map. |
MethodConstraints |
getConstraints()
Returns the client constraints placed on this proxy. |
RemoteMethodControl |
setConstraints(MethodConstraints constraints)
Returns a new copy of this proxy with the client constraints set to the specified constraints. |
| Methods inherited from class com.sun.jini.landlord.LandlordLease |
|---|
cancel, doRenew, equals, getReferentUuid, hashCode, setLandlord, toString |
| Methods inherited from class com.sun.jini.lease.AbstractLease |
|---|
getExpiration, getSerialFormat, renew, setSerialFormat |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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.| Method Detail |
|---|
public RemoteMethodControl setConstraints(MethodConstraints constraints)
RemoteMethodControlgetConstraints method of the copy returns
the identical constraints instance. The original proxy is not modified.
A null value is interpreted as mapping all methods to
empty constraints (one that has no requirements and no preferences).
For any given remote call, the specific client requirements and
preferences to be satisfied are given by the return value of invoking
the getConstraints method of
the specified MethodConstraints instance with a
Method object representing the remote method.
Client constraints placed on a proxy are included in the serialized
state of the proxy. This allows third-party services to be transparent
to the client's needs. For example, if remote object s1
obtains a proxy for remote object s2, and passes that
proxy to remote object s3, expecting s3 to
invoke a remote method on s2, then s1 can
control that call by placing its constraints directly on the proxy
before passing it to s3. If s3 does not
wish to be transparent in this way, then it should explicitly replace
the client constraints on received proxies with whatever constraints
are appropriate to implement its own policy.
setConstraints in interface RemoteMethodControlconstraints - client constraints, or null
RemoteMethodControl.getConstraints()public MethodConstraints getConstraints()
RemoteMethodControlnull, which is interpreted as mapping all
methods to empty constraints (one that has no requirements and no
preferences).
getConstraints in interface RemoteMethodControlnullRemoteMethodControl.setConstraints(net.jini.core.constraint.MethodConstraints)public boolean canBatch(Lease lease)
Lease
canBatch in interface LeasecanBatch in class LandlordLeaselease - the Lease to be evaluated
public LeaseMap createLeaseMap(long duration)
Lease
createLeaseMap in interface LeasecreateLeaseMap in class LandlordLeaseduration - the duration to put into a Long and use as the
value for the current lease in the created LeaseMap
|
GigaSpaces XAP 9.7.2 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||