|
Oracle Fusion Middleware Oracle WebLogic Server API Reference 11g Release 1 (10.3.5) Part Number E13941-05 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweblogic.cluster.singleton.SimpleLeasingBasis
public class SimpleLeasingBasis
Dumb LeasingBasis
that holds leases in-memory. Should only
be used in conjunction with replication or for testing purposes.
Nested Class Summary | |
---|---|
static class |
SimpleLeasingBasis.LeaseEntry
|
Constructor Summary | |
---|---|
SimpleLeasingBasis()
|
|
SimpleLeasingBasis(Map leaseTable)
|
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)
|
protected Map |
getLeaseTable()
|
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. |
int |
renewLeases(String owner,
Set leases,
int healthCheckPeriod)
Attempts to renew all the currently held leases. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleLeasingBasis()
public SimpleLeasingBasis(Map leaseTable)
Method Detail |
---|
protected Map getLeaseTable()
public boolean acquire(String leaseName, String owner, int leaseTimeout)
LeasingBasis
acquire
in interface LeasingBasis
leaseTimeout
- in milliseconds
public void release(String leaseName, String owner) throws IOException
LeasingBasis
release
in interface LeasingBasis
IOException
public String findOwner(String leaseName)
LeasingBasis
findOwner
in interface LeasingBasis
public String findPreviousOwner(String leaseName)
findPreviousOwner
in interface LeasingBasis
public int renewAllLeases(int healthCheckPeriod, String owner) throws MissedHeartbeatException
LeasingBasis
renewAllLeases
in interface LeasingBasis
healthCheckPeriod
- in milliseconds
MissedHeartbeatException
public int renewLeases(String owner, Set leases, int healthCheckPeriod) throws MissedHeartbeatException
LeasingBasis
renewLeases
in interface LeasingBasis
leases
- to be renewedhealthCheckPeriod
- in milliseconds
MissedHeartbeatException
public String[] findExpiredLeases(int gracePeriod)
LeasingBasis
findExpiredLeases
in interface LeasingBasis
gracePeriod
- in milliseconds
|
Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Oracle WebLogic Server API Reference 11g Release 1 (10.3.5) Part Number E13941-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |