org.javagroups.service.lease
Class LeaseFactoryService.LeaseInfo
java.lang.Object
|
+--org.javagroups.service.lease.LeaseFactoryService.LeaseInfo
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable
- Enclosing class:
- LeaseFactoryService
- 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.
- See Also:
- Serialized Form
Method Summary |
long |
expiresAt()
Get information when lease expires. |
void |
extendLease(long newExpiration)
Extend lease to new expiration term. |
java.lang.Object |
getTenant()
Get tenant that owns this lease. |
boolean |
isExpired()
Check if lease is expired. |
void |
readExternal(java.io.ObjectInput in)
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NEW_LEASE_TYPE
public static final int NEW_LEASE_TYPE
RENEW_LEASE_TYPE
public static final int RENEW_LEASE_TYPE
CANCEL_LEASE_TYPE
public static final int CANCEL_LEASE_TYPE
LeaseFactoryService.LeaseInfo
public LeaseFactoryService.LeaseInfo()
- Create uninitialized instance of this object. Should not be used
directly, only for
Externalizable
implementation.
LeaseFactoryService.LeaseInfo
public LeaseFactoryService.LeaseInfo(java.lang.Object tenant,
long expiresAt)
- Create instance of this class.
LeaseFactoryService.LeaseInfo
public LeaseFactoryService.LeaseInfo(LeaseRequestHeader requestHeader)
- Create instance of this class using request header.
expiresAt
public long expiresAt()
- Get information when lease expires.
getTenant
public java.lang.Object getTenant()
- Get tenant that owns this lease.
extendLease
public void extendLease(long newExpiration)
- Extend lease to new expiration term.
isExpired
public boolean isExpired()
- Check if lease is expired.
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
Copyright © 2001,2002 www.javagroups.com . All Rights Reserved.