Package jetbrains.buildServer.agent.impl
Class ServerMonitorImpl
- java.lang.Object
-
- java.lang.Thread
-
- jetbrains.buildServer.agent.impl.ServerMonitorImpl
-
- All Implemented Interfaces:
Runnable
,ServerMonitor
public class ServerMonitorImpl extends Thread implements ServerMonitor
- Author:
- Kir
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getFailedRegistrationsCount()
Long
getMillisAfterLastPing()
CountDownLatch
getSemaphore()
void
ping()
void
run()
void
scheduleReregister()
boolean
serverNotAvailable()
void
setParameters(int acceptableServerInactivity, int reregisterTimeout)
void
shutdown()
void
startAndWait()
-
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
-
-
-
-
Method Detail
-
startAndWait
public void startAndWait()
- Specified by:
startAndWait
in interfaceServerMonitor
-
serverNotAvailable
public boolean serverNotAvailable()
- Specified by:
serverNotAvailable
in interfaceServerMonitor
-
ping
public void ping()
- Specified by:
ping
in interfaceServerMonitor
-
scheduleReregister
public void scheduleReregister()
- Specified by:
scheduleReregister
in interfaceServerMonitor
-
setParameters
public void setParameters(int acceptableServerInactivity, int reregisterTimeout)
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceServerMonitor
-
getMillisAfterLastPing
public Long getMillisAfterLastPing()
- Returns:
- null if result is unknown
-
getFailedRegistrationsCount
@TestOnly public int getFailedRegistrationsCount()
-
getSemaphore
@TestOnly public CountDownLatch getSemaphore()
-
-