org.jgroups.service.lease
Class LeaseFactoryService.LeaseInfo
java.lang.Object
org.jgroups.service.lease.LeaseFactoryService.LeaseInfo
- LeaseFactoryService
- java.io.Externalizable
public static class LeaseFactoryService.LeaseInfo
extends java.lang.Object
implements java.io.Externalizable
This class represents granted lease that is replicated between services.
Each LeaseInfo
class contains information when lease expires
(absolute time) and a tenant to which lease was granted.
CANCEL_LEASE_TYPE
public static final int CANCEL_LEASE_TYPE
NEW_LEASE_TYPE
public static final int NEW_LEASE_TYPE
RENEW_LEASE_TYPE
public static final int RENEW_LEASE_TYPE
LeaseInfo
public LeaseInfo()
Create uninitialized instance of this object. Should not be used
directly, only for java.io.Externalizable
implementation.
LeaseInfo
public LeaseInfo(Object tenant,
long expiresAt)
Create instance of this class.
LeaseInfo
public LeaseInfo(LeaseRequestHeader requestHeader)
Create instance of this class using request header.
expiresAt
public long expiresAt()
Get information when lease expires.
extendLease
public void extendLease(long newExpiration)
Extend lease to new expiration term.
getTenant
public Object getTenant()
Get tenant that owns this lease.
isExpired
public boolean isExpired()
Check if lease is expired.
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.