public class FlexibleTimerFlush
extends java.lang.Object
implements java.awt.event.ActionListener
| Constructor and Description |
|---|
FlexibleTimerFlush(LoggerIfc theLogger,
FlexibleAggrTable table,
FlexibleTableFlush flushHandler,
long flushIntervalMillis,
boolean writeOutFlushedRecords,
boolean longDurationCheck) |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
This method is called when the flush timer expires.
|
void |
addRecord(java.lang.Object key)
Adds a record to the flush timer's list of records to flush.
|
void |
addRecord(java.lang.Object key,
java.lang.Long oldTime)
Adds a record to the flush timer's list of records to flush.
|
boolean |
containsRecord(java.lang.Object key) |
void |
deactivateTimer(FlexibleNARKey searchKey)
This will mark a key as inactive so it cannot be flushed.
|
boolean |
isHealthy()
Added for Node Health support.
|
void |
printTimerValue(FlexibleNARKey searchKey)
Should only be used for debug purposes.
|
void |
reactivateTimer(FlexibleNARKey searchKey)
This will re-activate a previously deactivated timer.
|
void |
removeAllEntries()
This is used by the Daily Flush feature to remove all record entries
from the timer tables, since all the records are about to be removed.
|
void |
removeRecord(java.lang.Object key) |
void |
resetFlushTimer(java.lang.Object key)
Reset the flush timer for a given entry in the table, as
determined by the "FlushTimerSet" configuration setting.
|
void |
setFlushTimerValue(int flushInterval)
Sets the initialFlushTimerInterval
|
void |
setFlushTimerValue(long flushInterval) |
void |
shutdown()
Shuts down the flushing capabilities, including the flush timer.
|
void |
startFlushTimer()
Starts the flush timer thread.
|
void |
writeHashMapToFile(java.io.File dir,
java.lang.String fName)
Writes flushTimerMap data into a file
|
public FlexibleTimerFlush(LoggerIfc theLogger, FlexibleAggrTable table, FlexibleTableFlush flushHandler, long flushIntervalMillis, boolean writeOutFlushedRecords, boolean longDurationCheck)
public void startFlushTimer()
public void setFlushTimerValue(int flushInterval)
flushInterval - public void setFlushTimerValue(long flushInterval)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void shutdown()
public void resetFlushTimer(java.lang.Object key)
public void addRecord(java.lang.Object key)
key - Key of the record to be flushed at a later time.public void addRecord(java.lang.Object key,
java.lang.Long oldTime)
key - Key of the record to be flushed at a later time.oldTime - expiry time of keypublic boolean isHealthy()
public void removeRecord(java.lang.Object key)
public boolean containsRecord(java.lang.Object key)
public void writeHashMapToFile(java.io.File dir,
java.lang.String fName)
dir - Name of directoryfName - Name of filepublic void printTimerValue(FlexibleNARKey searchKey)
public void deactivateTimer(FlexibleNARKey searchKey)
public void reactivateTimer(FlexibleNARKey searchKey)
public void removeAllEntries()