|
Oracle Application Server Containers for J2EE Support for JavaServer Pages API Reference 10g Release 2 (10.1.2) B14015-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jsp.jwcache.ExpirationPolicy
ExpirationPolicy
represents the expiration and storage information used in storing cache data in cache repository.
Field Summary | |
protected CachePolicy |
cachePolicyObj CachePolicy (protected) object handle that this expiration policy is a part of. |
static int |
TYPE_DAILY integer constant for expiration type: daily - daily expiration at a fixed time |
static int |
TYPE_MONTHLY integer constant for expiration type: monthly - monthly expiration at a fixed time at a fixed day |
static java.lang.String[] |
TYPE_STRS expiration type keyword strings: TTL, daily, weekly, monthly |
static int |
TYPE_TTL integer constant for expiration type: TTL - Time To Live |
static int |
TYPE_WEEKLY integer constant for expiration type: weekly - weekly expiration at a fixed time at a fixed day |
static int |
WEEKLY_FRIDAY integer constant for weekly expiration on Friday |
static int |
WEEKLY_MONDAY integer constant for weekly expiration on Monday |
static int |
WEEKLY_SATURDAY integer constant for weekly expiration on Saturday |
static java.lang.String[] |
WEEKLY_STRS weekly expiration type keyword strings: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday |
static int |
WEEKLY_SUNDAY integer constant for weekly expiration on Sunday |
static int |
WEEKLY_THURSDAY integer constant for weekly expiration on Thursday |
static int |
WEEKLY_TUESDAY integer constant for weekly expiration on Tuesday |
static int |
WEEKLY_WEDNESDAY integer constant for weekly expiration on Wednesday |
Constructor Summary | |
ExpirationPolicy() Constructor for default expiration policy |
|
ExpirationPolicy(ExpirationPolicy expPolicy) Copy constructor for expiration policy |
|
ExpirationPolicy(int type, long ttl, long timeInaDay, int dayInaWeek, int dayInaMonth, boolean writeThrough) Full constructor for expiration policy |
Method Summary | |
int |
getDayInaMonth() to get the day of a month when the monthly expiration happens (in integer) |
int |
getDayInaWeek() to get the day of a week when the weekly expiration happens (in integer) |
long |
getExpirationTime(long cur) to calculate the expiration time based on the expiration policy and given current time |
int |
getExpirationType() get the type of the expiration (in integer) |
long |
getTimeInaDay() get the time in a day (in seconds, in long) when the expiration happens (if the type is daily, weekly or monthly) |
long |
getTTL() get the TTL (time-to-live) value (in long) |
boolean |
getWriteThrough() to get the flag of the persistence write through flag |
void |
setDayInaMonth(int dayInaMonth) to set the day of a month when the monthly expiration happens (in integer) |
void |
setDayInaWeek(int dayInaWeek) to set the day of a week when the weekly expiration happens (in integer) |
void |
setDayInaWeek(java.lang.String s) to set the day of a week when the weekly expiration happens (in String) |
void |
setExpirationType(int type) set the type of the expiration (in integer) |
void |
setExpirationType(java.lang.String s) set the type of the expiration (in String) |
void |
setTimeInaDay(long timeInaDay) set the time in a day (in seconds, in long) when the expiration happens (if the type is daily, weekly or monthly) |
void |
setTimeInaDay(java.lang.String s) set the time in a day (in String, in "00:00:00" format) when the expiration happens (if the type is daily, weekly or monthly) |
void |
setTTL(long ttl) set the TTL (time-to-live) value (in long) |
void |
setWriteThrough(boolean writeThrough) to set the flag of the persistence write through flag |
void |
setWriteThrough(java.lang.String v) to set the flag of the persistence write through flag (by String) |
java.lang.String |
toString() to get the XML-based description string of the expiration policy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected CachePolicy cachePolicyObj
CachePolicy
(protected) object handle that this expiration policy is a part of.public static final int TYPE_TTL
public static final int TYPE_DAILY
public static final int TYPE_WEEKLY
public static final int TYPE_MONTHLY
public static final java.lang.String[] TYPE_STRS
public static final int WEEKLY_SUNDAY
public static final int WEEKLY_MONDAY
public static final int WEEKLY_TUESDAY
public static final int WEEKLY_WEDNESDAY
public static final int WEEKLY_THURSDAY
public static final int WEEKLY_FRIDAY
public static final int WEEKLY_SATURDAY
public static final java.lang.String[] WEEKLY_STRS
Constructor Detail |
public ExpirationPolicy()
TYPE is TTL; time to live is 300 seconds; expiration time in a day is 300 seconds from mid-nite (ignored because of TTL type); weekly expiration day is Wednesday (ignored); monthly expiration day is 10 (ignored); persistence write-through option is true / on.
public ExpirationPolicy(ExpirationPolicy expPolicy)
public ExpirationPolicy(int type, long ttl, long timeInaDay, int dayInaWeek, int dayInaMonth, boolean writeThrough)
type
- expiration policy typettl
- TTL / time-to-live (in seconds)timeInaDay
- the time when the daily / weekly / monthly expiration happens the time is measured in seconds elapsed from mid-nitedayInaWeek
- the day when the weekly expiration happensdayInaMonth
- the day when the monthly expiration happenswriteThrough
- the boolean flag that specifies whether persistent write through is on.Method Detail |
public int getExpirationType()
public void setExpirationType(int type)
type
- the type of the expiration (in integer)public void setExpirationType(java.lang.String s)
s
- the type of the expiration (in String)public long getTTL()
public void setTTL(long ttl)
ttl
- the TTL (time-to-live) value (in long)public long getTimeInaDay()
public void setTimeInaDay(long timeInaDay)
timeInaDay
- the time in a day (in seconds, in long) when the expiration happenspublic void setTimeInaDay(java.lang.String s) throws java.text.ParseException
s
- the time in a day (in String, in "00:00:00" format) when the expiration happensjava.text.ParseException
public java.lang.String toString()
public int getDayInaWeek()
public void setDayInaWeek(int dayInaWeek)
dayInaWeek
- the day of a week when the weekly expiration happens (in integer)public void setDayInaWeek(java.lang.String s)
s
- the day of a week when the weekly expiration happens (in String)public int getDayInaMonth()
public void setDayInaMonth(int dayInaMonth)
dayInaMonth
- the day of a month when the monthly expiration happens (in integer)public boolean getWriteThrough()
public void setWriteThrough(boolean writeThrough)
writeThrough
- set the flag of the persistence write through flagpublic void setWriteThrough(java.lang.String v)
v
- set the flag of the persistence write through flag (by String)public long getExpirationTime(long cur)
Both expiration time and given current time are the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
cur
- the given current time (in long)
|
Oracle Application Server Containers for J2EE Support for JavaServer Pages API Reference 10g Release 2 (10.1.2) B14015-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |