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 intgetFailedRegistrationsCount()LonggetMillisAfterLastPing()CountDownLatchgetSemaphore()voidping()voidrun()voidscheduleReregister()booleanserverNotAvailable()voidsetParameters(int acceptableServerInactivity, int reregisterTimeout)voidshutdown()voidstartAndWait()-
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:
startAndWaitin interfaceServerMonitor
-
serverNotAvailable
public boolean serverNotAvailable()
- Specified by:
serverNotAvailablein interfaceServerMonitor
-
ping
public void ping()
- Specified by:
pingin interfaceServerMonitor
-
scheduleReregister
public void scheduleReregister()
- Specified by:
scheduleReregisterin interfaceServerMonitor
-
setParameters
public void setParameters(int acceptableServerInactivity, int reregisterTimeout)
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceServerMonitor
-
getMillisAfterLastPing
public Long getMillisAfterLastPing()
- Returns:
- null if result is unknown
-
getFailedRegistrationsCount
@TestOnly public int getFailedRegistrationsCount()
-
getSemaphore
@TestOnly public CountDownLatch getSemaphore()
-
-