*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.deployment
Class OperationMonitor
java.lang.Object
java.lang.Thread
com.sas.services.deployment.OperationMonitor
- All Implemented Interfaces:
OperationMonitorInterface,Runnable
@SASScope("ALL")
@BinaryCompatibilityOnly
public class OperationMonitor
extends Thread
implements OperationMonitorInterface
Operation monitor thread.
- Since:
- 1.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a default instance of an operation monitor.OperationMonitor(String threadName) Constructs an instance of an operation monitor using the specified name for the thread. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddThrowable(Throwable throwable) Adds a throwable.final Throwable[]Gets the throwables which occurred during the monitored operation.final booleanWhether the operation has completed its execution.final booleanisOK()Determines whether any exceptions were encountered during the monitored operation.voidrun()Monitor's runnable method which is invoked upon completion of the execution of the monitored process.final voidSpecifies that the operation has completed its execution.Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yieldMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
OperationMonitor
public OperationMonitor()Constructs a default instance of an operation monitor. -
OperationMonitor
public OperationMonitor(String threadName) Constructs an instance of an operation monitor using the specified name for the thread.- Parameters:
threadName- Thread's name.
-
-
Method Details
-
hasOperationCompleted
public final boolean hasOperationCompleted()Whether the operation has completed its execution.- Specified by:
hasOperationCompletedin interfaceOperationMonitorInterface- Returns:
trueif the operation has completed.
-
setOperationCompleted
public final void setOperationCompleted()Specifies that the operation has completed its execution.- Specified by:
setOperationCompletedin interfaceOperationMonitorInterface
-
isOK
public final boolean isOK()Determines whether any exceptions were encountered during the monitored operation.- Specified by:
isOKin interfaceOperationMonitorInterface- Returns:
trueif no exceptions where encountered.- See Also:
-
addThrowable
public final void addThrowable(Throwable throwable) Adds a throwable.- Specified by:
addThrowablein interfaceOperationMonitorInterface- Parameters:
throwable- Throwable encountered during the monitored operation.- See Also:
-
getThrowables
public final Throwable[] getThrowables()Gets the throwables which occurred during the monitored operation.- Specified by:
getThrowablesin interfaceOperationMonitorInterface- Returns:
- Throwables which were encountered during the monitored operation or an empty array if the operation was executed successfully.
- See Also:
-
run
public void run()Monitor's runnable method which is invoked upon completion of the execution of the monitored process. Override this method to implement behavior customized to your use case.- Specified by:
runin interfaceRunnable- Overrides:
runin classThread- See Also:
-