| Constructor and Description |
|---|
DurableNotificationLease(ReplicationNotificationClientEndpoint replicationNotificationClientEndpoint,
long lease,
EventSessionConfig sessionConfig,
IAsyncHandlerProvider asyncProvider) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
cancel()
Used by the lease holder to indicate that it is no longer interested in the resource or
information held by the 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.
|
long |
getExpiration()
Returns a
long that indicates the time that the lease will expire. |
org.slf4j.Logger |
getLogger() |
int |
getSerialFormat()
Returns the format that will be used to serialize the lease.
|
void |
renew(long duration)
Used to renew a lease for an additional period of time, specified in milliseconds.
|
void |
setSerialFormat(int format)
Sets the format to use when serializing the lease.
|
void |
startLeaseReaperIfNecessary() |
public DurableNotificationLease(ReplicationNotificationClientEndpoint replicationNotificationClientEndpoint, long lease, EventSessionConfig sessionConfig, IAsyncHandlerProvider asyncProvider)
public org.slf4j.Logger getLogger()
public void startLeaseReaperIfNecessary()
public long getExpiration()
Leaselong that indicates the time that the lease will expire. This time is
represented as milliseconds from the beginning of the epoch, relative to the local clock.getExpiration in interface Leaselong that indicates the time that the lease will expirepublic void cancel()
Leasepublic void renew(long duration)
throws LeaseDeniedException,
UnknownLeaseException,
RemoteException
Leaserenew in interface Leaseduration - the requested duration in millisecondsLeaseDeniedException - the lease grantor is unable or unwilling to renew the leaseUnknownLeaseException - the lease being renewed is unknown to the lease grantorRemoteExceptionpublic void setSerialFormat(int format)
LeasesetSerialFormat in interface Leaseformat - DURATION or ABSOLUTELease.getSerialFormat()public int getSerialFormat()
LeasegetSerialFormat in interface LeaseLease.setSerialFormat(int)public LeaseMap createLeaseMap(long duration)
LeasecreateLeaseMap in interface Leaseduration - the duration to put into a Long and use as the value for the current lease in
the created LeaseMappublic boolean canBatch(Lease lease)
LeaseCopyright © GigaSpaces.