|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.splout.db.common.HeartBeater
public class HeartBeater
A Heart Beater mostly inspired by the one in SolrOutputFormat PATCH
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
LOG
|
static java.lang.String |
WAIT_TIME_CONF
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
HeartBeater(org.apache.hadoop.util.Progressable progress,
long waitTimeMs)
Create the heart beat object thread set it to daemon priority and start the thread. |
Method Summary | |
---|---|
void |
cancelHeartBeat()
inform the background thread that this heartbeat request is not needed. |
org.apache.hadoop.util.Progressable |
getProgress()
|
void |
needHeartBeat()
inform the background thread that heartbeats are to be issued. |
void |
run()
|
void |
setProgress(org.apache.hadoop.util.Progressable progress)
|
void |
setStatus(java.lang.String status)
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static org.apache.commons.logging.Log LOG
public static final java.lang.String WAIT_TIME_CONF
Constructor Detail |
---|
public HeartBeater(org.apache.hadoop.util.Progressable progress, long waitTimeMs)
threadsNeedingHeartBeat
is positive, the heart beat will be issued on the progress object ever 5 seconds.
Method Detail |
---|
public org.apache.hadoop.util.Progressable getProgress()
public void setProgress(org.apache.hadoop.util.Progressable progress)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void needHeartBeat()
public void cancelHeartBeat()
needHeartBeat()
request.
public void setStatus(java.lang.String status)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |