|
BEA Systems, Inc. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
public interface LeasingBasis
A LeasingBasis provides the underpinnings for implementing the LeaseManager. Different LeasingBasis-es with different characteristics can be plugged in. For example, a LeasingBasis might be implemented against a backing database, against a uniquely-chosen file store, or from first principles using a distributed agreement algorithm.
| Method Summary | |
|---|---|
boolean |
acquire(String leaseName,
String owner,
int leaseTimeout)
Attempts to claim immediate ownership of a lease for this server. |
String[] |
findExpiredLeases(int gracePeriod)
Returns a list of the servers that have consistently missed sending heartbeats in a timely manner, and failed to do so for longer than their grace period. |
String |
findOwner(String leaseName)
Returns the identity of the server that currently owns the lease. |
String |
findPreviousOwner(String leaseName)
|
void |
release(String leaseName,
String owner)
If the lease is owned by this server, attempts to give up ownership. |
int |
renewAllLeases(int healthCheckPeriod,
String owner)
Attempts to send a heartbeat to prove the health of the server. |
| Method Detail |
|---|
boolean acquire(String leaseName,
String owner,
int leaseTimeout)
throws IOException,
LeasingException
leaseName - owner - leaseTimeout - in milliseconds
IOException
LeasingException
void release(String leaseName,
String owner)
throws IOException
leaseName - owner -
IOException
String findOwner(String leaseName)
throws IOException
leaseName -
IOException
String findPreviousOwner(String leaseName)
throws IOException
IOException
int renewAllLeases(int healthCheckPeriod,
String owner)
throws IOException,
MissedHeartbeatException
healthCheckPeriod - in millisecondsowner -
IOException
MissedHeartbeatException
String[] findExpiredLeases(int gracePeriod)
throws IOException
gracePeriod - in milliseconds
IOException
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs92 Copyright 2006 BEA Systems Inc. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||