Oracle Application Server Wireless Java API Reference
B10400-01

oracle.panama.feed
Interface UpdatePolicy


public interface UpdatePolicy

The UpdatePolicy models the data feeder update policy in terms of when to start, stop, and update interval.


Field Summary
static int UPDATE_FRI
           
static int UPDATE_MON
          Constants for setting update days
static int UPDATE_SAT
           
static int UPDATE_SUN
           
static int UPDATE_THU
           
static int UPDATE_TUE
           
static int UPDATE_WED
           
static int UPDATE_WEEKENDS
           
static int UPDATE_WORKDAYS
           

 

Method Summary
 int getBatchSize()
          Get the batch size to use for downloads
 int getEndTimeHour()
          Get the end time hour portion
 int getEndTimeMin()
          Get the end time minute portion
 int getEndTimeSec()
          Get the end time seconds portion
 java.util.Date getNextUpdateEnd()
          Get the date/time of the next update cycle end, relative to right now.
 java.util.Date getNextUpdateStart()
          Get the date/time of the next update cycle start, relative to right now.
 int getStartTimeHour()
          Get the start time hour portion
 int getStartTimeMin()
          Get the start time minute portion
 int getStartTimeSec()
          Get the start time seconds portion
 int getUpdateDays()
          Get the days of the week to run
 long getUpdateInterval()
          Get the interval between updates, in seconds
 void setBatchSize(int batchSize)
          Set the batch size to use for downloads
 void setEndTime(int hour, int minute, int sec)
          set the time that the data feeder should stop run.
 void setStartTime(int hour, int minute, int sec)
          set the start time that the data feeder should run.
 void setUpdateDays(int bitmask)
          Set the days of the week to run The days are specified as an bitmask; for example in order to update on Mondays and Wednesdays you would do the following: updatePolicy.setUpdateDays(UpdatePolicy.UPDATE_MON | UpdatePolicy.UPDATE_WED);
 void setUpdateInterval(long interval)
          Set the interval between updates, in seconds

 

Field Detail

UPDATE_MON

public static final int UPDATE_MON
Constants for setting update days
See Also:
The notion of 'Workdays' is hard-wired: UPDATE_WORKDAYS means Monday through Friday UPDATE_WEEKENDS means Saturday and Sunday, Constant Field Values

UPDATE_TUE

public static final int UPDATE_TUE
See Also:
Constant Field Values

UPDATE_WED

public static final int UPDATE_WED
See Also:
Constant Field Values

UPDATE_THU

public static final int UPDATE_THU
See Also:
Constant Field Values

UPDATE_FRI

public static final int UPDATE_FRI
See Also:
Constant Field Values

UPDATE_SAT

public static final int UPDATE_SAT
See Also:
Constant Field Values

UPDATE_SUN

public static final int UPDATE_SUN
See Also:
Constant Field Values

UPDATE_WORKDAYS

public static final int UPDATE_WORKDAYS
See Also:
Constant Field Values

UPDATE_WEEKENDS

public static final int UPDATE_WEEKENDS
See Also:
Constant Field Values
Method Detail

setStartTime

public void setStartTime(int hour,
                         int minute,
                         int sec)
set the start time that the data feeder should run. The time is specified in local time.
Parameters:
hour - start hour, 0-23
minute - start minute, 0-59

getStartTimeHour

public int getStartTimeHour()
Get the start time hour portion
Returns:
the start time hour

getStartTimeMin

public int getStartTimeMin()
Get the start time minute portion
Returns:
the start time minute

getStartTimeSec

public int getStartTimeSec()
Get the start time seconds portion
Returns:
the start time second

setEndTime

public void setEndTime(int hour,
                       int minute,
                       int sec)
set the time that the data feeder should stop run. The time is specified in local time.
Parameters:
hour - end hour, 0-23
minute - end minute, 0-59

getEndTimeHour

public int getEndTimeHour()
Get the end time hour portion
Returns:
the end time hour

getEndTimeMin

public int getEndTimeMin()
Get the end time minute portion
Returns:
the end time minute

getEndTimeSec

public int getEndTimeSec()
Get the end time seconds portion
Returns:
the end time second

getUpdateInterval

public long getUpdateInterval()
Get the interval between updates, in seconds
Returns:
the update interval in seconds

setUpdateInterval

public void setUpdateInterval(long interval)
Set the interval between updates, in seconds
Parameters:
interval - the new update interval

getBatchSize

public int getBatchSize()
Get the batch size to use for downloads
Returns:
the batch size

setBatchSize

public void setBatchSize(int batchSize)
Set the batch size to use for downloads
Parameters:
batchSize - the new batch size

setUpdateDays

public void setUpdateDays(int bitmask)
Set the days of the week to run The days are specified as an bitmask; for example in order to update on Mondays and Wednesdays you would do the following: updatePolicy.setUpdateDays(UpdatePolicy.UPDATE_MON | UpdatePolicy.UPDATE_WED);
Parameters:
bitmask - specifying which days to run

getUpdateDays

public int getUpdateDays()
Get the days of the week to run
Returns:
bitmask specifying which days to run

getNextUpdateStart

public java.util.Date getNextUpdateStart()
Get the date/time of the next update cycle start, relative to right now.
Returns:
<{Date}>

getNextUpdateEnd

public java.util.Date getNextUpdateEnd()
Get the date/time of the next update cycle end, relative to right now.
Returns:
<{Date}>

Oracle Application Server Wireless Java API Reference
B10400-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.