Compoze Software, Inc.

com.compoze.trigger
Class ConstantTimeoutAlgorithm


java.lang.Object

  |

  +--com.compoze.trigger.AbstractTimeoutAlgorithm

        |

        +--com.compoze.trigger.ConstantTimeoutAlgorithm

All Implemented Interfaces:
ITimeoutAlgorithm, ITriggerPropertiesKeys, java.io.Serializable

public class ConstantTimeoutAlgorithm
extends AbstractTimeoutAlgorithm
implements java.io.Serializable, ITriggerPropertiesKeys

This class implements a timeout algorithm that always returns the same value. The configuration for the timeout when the default constructor is used is obtained from the TriggerProperties object.

See Also:
Serialized Form

Fields inherited from interface com.compoze.trigger.ITriggerPropertiesKeys
TRIGGER_BACKLOG_KEY, TRIGGER_BINDADDRESS_KEY, TRIGGER_DISCOVERY_GROUP_KEY, TRIGGER_DISCOVERY_MAGIC_KEY, TRIGGER_DISCOVERY_PORT_KEY, TRIGGER_DISCOVERY_SERVER_KEY, TRIGGER_DISCOVERY_TIMEOUT_KEY, TRIGGER_DISCOVERY_TTL_KEY, TRIGGER_EVENTLIST_KEY, TRIGGER_PORT_KEY, TRIGGER_STARTUP_DATASOURCE_NAME, TRIGGER_STARTUP_JDBC_DRIVER, TRIGGER_STARTUP_JDBC_PASSWORD, TRIGGER_STARTUP_JDBC_POOL_SIZE, TRIGGER_STARTUP_JDBC_URL, TRIGGER_STARTUP_JDBC_USERNAME, TRIGGER_STARTUP_KEY, TRIGGER_TIMEOUT_IMPLEMENTOR, TRIGGER_TIMEOUT_INITIAL, TRIGGER_TIMEOUT_NAGLEFACTOR, TRIGGER_TIMEOUT_RETRIES
 
Constructor Summary
ConstantTimeoutAlgorithm()
          Constructor.
ConstantTimeoutAlgorithm(long lTimeout, int iRetries)
          Constructor.
 
Method Summary
 long getNextTimeout(long lInitialTimeout, int iRetries, long lLastTimeout)
          Get the next timeout to use.
 
Methods inherited from class com.compoze.trigger.AbstractTimeoutAlgorithm
getNextTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantTimeoutAlgorithm


public ConstantTimeoutAlgorithm()
Constructor.

ConstantTimeoutAlgorithm


public ConstantTimeoutAlgorithm(long lTimeout,
                                int iRetries)
Constructor.
Parameters:
lTimeout - the timeout to use
iRetries - the maximum number of retries
Method Detail

getNextTimeout


public long getNextTimeout(long lInitialTimeout,
                           int iRetries,
                           long lLastTimeout)
Get the next timeout to use. If an initial timeout is specified this method is not called the first time.
Overrides:
getNextTimeout in class AbstractTimeoutAlgorithm
Parameters:
lInitialTimeout - the initial timeout that was used (-1 for no initial)
iRetryNumber - the current retry number
lLastTimeout - the last timeout that was used
Returns:
the next timeout, or -1 if no more retries (in milliseconds)

Compoze Software, Inc.

Copyright ©1999-2001 Compoze Software, Inc. All rights reserved.