Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 5.1.0sp9 API Reference

## weblogic.time.common
Class TimeRepeat

    java.lang.Object
      |
      +--weblogic.time.common.TimeRepeat

public class TimeRepeat
extends java.lang.Object
implements Schedulable

A utility class for scheduling a repeating trigger. This class implements Schedulable, and may be used as an argument to the constructor for a Scheduler object, which in turn becomes an argument for a call to the factory method, `TimeServicesDef.getScheduledTrigger()`. To use this class, set the interval of repetition in its constructor, you may also want to call its `setFirstScheduleTime()` method with the time of day (in milliseconds) at which the first occurrence of the schedule should begin.

Author:
  Copyright (c) 1996-97 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1999 by BEA WebXpress. All Rights Reserved.
  Copyright © 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  `TimeServicesDef`

Constructor Summary
`TimeRepeat()` Internal use only.
`TimeRepeat(int intervalMillis)` Constructs a TimeRepeat (a Schedulable object) that repeats regularly, for scheduling triggers.

Method Summary
`long` | `getFirstScheduleTime()`
`long` | `lastTime()` Returns the last time this Schedulable's `schedule()` was called.
`long` | `schedule(long currentTimeMillis)` Sets the time of the first scheduled occurrence of a regularly repeating schedule.
`void` | `setFirstScheduleTime(long firstScheduleTimeInMillis)` Sets the time of the first scheduled occurrence of a regularly repeating schedule.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TimeRepeat

    public TimeRepeat()

  Internal use only.

### TimeRepeat

    public TimeRepeat(int intervalMillis)

  Constructs a TimeRepeat (a Schedulable object) that repeats regularly, for scheduling triggers.

  Parameters:
    `intervalMillis` - Interval of repetition

Method Detail

### lastTime

    public long lastTime()

  Returns the last time this Schedulable's `schedule()` was called.

  Returns:
    Time of day in milliseconds

### schedule

    public long schedule(long currentTimeMillis)

  Sets the time of the first scheduled occurrence of a regularly repeating schedule. Implements the `schedule()` method from the Schedulable interface. Call this method with the time of day in milliseconds to start the schedule, which will then repeat regularly according to the interval set in the constructor. The repeat algorithm is setup specifically not to drift, which means that the timer will have very tight periodicity.
  Specified by:
    schedule in interface Schedulable

  Parameters:
    `currentMillis` - Time of first scheduled occurrence
  Returns:
    Time of next occurrence

### setFirstScheduleTime

    public void setFirstScheduleTime(long firstScheduleTimeInMillis)

  Sets the time of the first scheduled occurrence of a regularly repeating schedule. Call this method with the time of day in milliseconds to start the schedule, which will then repeat regularly according to the interval set in the constructor. Note if the firstScheduleTimeInMillis is less than currentTimeMillis then this causes the trigger to not rescheduled.

  Parameters:
    `firstScheduleTimeInMillis` - the time of the day in milliseconds when the first trigger will run

### getFirstScheduleTime

    public long getFirstScheduleTime()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://www.weblogic.com/docs51
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD