weblogic.cluster.singleton
Class QueryHelperImpl
java.lang.Object
weblogic.cluster.singleton.QueryHelper
weblogic.cluster.singleton.QueryHelperImpl
public class QueryHelperImpl
- extends QueryHelper
Helper class for ClusterMaster to determine servers that are
unresponsive and to find lease owners.
Queries for lease management. Each lease has an associated timeout
which is calculated as (SYSDATE - TIMEOUT). TIMEOUT is initially
caclulated as an absolute time in the future (ie. SYSDATE +
interval), without renewal TIMEOUT will eventually be in the past
and SYSDATE - TIMEOUT will become positive.
Method Summary |
protected String |
addToDate(String column,
int seconds)
Returns an sql snippet that adds the specifed number of seconds to the
date value. |
protected String |
compareDates(String date1,
String date2)
Returns an sql snippet that compares the two specified dates. |
protected String |
getTimeFunction()
Returns a query that returns the current time & date, down to at
least seconds precision. |
Methods inherited from class weblogic.cluster.singleton.QueryHelper |
getAbdicateLeaseQuery, getAcquireLeaseQuery, getAssumeLeaseQuery, getDBType, getDeleteMachineQuery, getInsertMachineQuery, getLeaseOwnerQuery, getPreviousLeaseOwnerQuery, getRenewAllLeasesQuery, getRenewLeaseQuery, getRetrieveMachineQuery, getUnresponsiveMigratableServersQuery, init |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueryHelperImpl
public QueryHelperImpl(String tableName,
String domainName,
String clusterName,
int dbtype)
addToDate
protected String addToDate(String column,
int seconds)
- Description copied from class:
QueryHelper
- Returns an sql snippet that adds the specifed number of seconds to the
date value.
- Specified by:
addToDate
in class QueryHelper
- Parameters:
column
- date variable to add toseconds
- number of seconds to add to column
- Returns:
- an sql snippet
compareDates
protected String compareDates(String date1,
String date2)
- Description copied from class:
QueryHelper
- Returns an sql snippet that compares the two specified dates. The
query should return true if date1 is later than date2.
- Specified by:
compareDates
in class QueryHelper
- Returns:
- an sql snippet
getTimeFunction
protected String getTimeFunction()
- Description copied from class:
QueryHelper
- Returns a query that returns the current time & date, down to at
least seconds precision.
- Specified by:
getTimeFunction
in class QueryHelper
- Returns:
- an sql snippet