|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.taleo.integration.client.customstep.count.CountManager
public class CountManager
Manage the record count.
Count will be reset, overwriting the daily count file, each day at 00:00:00 in the "America/New_York" time zone. This time zone adapts to daylight savings and is the one all Taleo servers are set and should not need to change. However, if needed, the time zone can be set differently using the System property called "com.taleo.client.customstep.CountManager.ResetTimeZone".
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_RESET_TIME_ZONE
Default value for com.taleo.client.customstep.CountManager.ResetTimeZone system property. |
static java.lang.Object |
PIPELINE_KEY
Key for the CountManager in the pipeline. |
Constructor Summary | |
---|---|
CountManager()
Constructor without arguments. |
|
CountManager(java.io.File file)
Constructor with the file to store the count. |
Method Summary | |
---|---|
java.util.Date |
getCurrentDate()
Get the current execution date. |
java.lang.String |
getCurrentEntity()
Get the current entity. |
java.lang.String |
getCurrentExtractId()
Get the current extract Id. |
int |
getCurrentRecordCount()
Get the current record count. |
int |
getDailyRecordCount()
Get the daily count. |
int |
getDailyRunCount()
Get the daily completed run count (excluding the current run). |
java.io.File |
getFile()
Get the file where the count state is stored. |
java.util.Date |
getNextResetTime()
Get the next reset time in the local time zone. |
protected java.util.Date |
getNextResetTime(java.util.Date now)
Get the next reset time in the local time zone. |
protected boolean |
mustReset(java.util.Date now,
java.util.Date lastModifiedDate)
Determine if a count file with the given last modified date must be reset. |
void |
save()
Save the count state on disk. |
void |
setCurrentDate(java.util.Date date)
Set the current execution date. |
void |
setCurrentEntity(java.lang.String entity)
Set the current entity. |
void |
setCurrentExtractId(java.lang.String extractId)
Set the current extract Id. |
void |
setCurrentRecordCount(int recordCount)
Set the current record count. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Object PIPELINE_KEY
public static final java.lang.String DEFAULT_RESET_TIME_ZONE
Constructor Detail |
---|
public CountManager()
public CountManager(java.io.File file) throws java.io.IOException
file
- The file to store the count state.
java.io.IOException
Method Detail |
---|
protected boolean mustReset(java.util.Date now, java.util.Date lastModifiedDate)
now
- lastModifiedDate
-
public java.util.Date getNextResetTime()
protected java.util.Date getNextResetTime(java.util.Date now)
now
-
public void setCurrentExtractId(java.lang.String extractId)
public java.lang.String getCurrentExtractId()
public void setCurrentEntity(java.lang.String entity)
public java.lang.String getCurrentEntity()
public void setCurrentDate(java.util.Date date)
public java.util.Date getCurrentDate()
public void setCurrentRecordCount(int recordCount)
public int getCurrentRecordCount()
public int getDailyRunCount()
public int getDailyRecordCount()
public java.io.File getFile()
public void save() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |