public class ProcessHandler
extends java.lang.Object
Constructor and Description |
---|
ProcessHandler(java.lang.Thread processThread,
ServerProcess process,
Login owner,
ProcessHandler previous,
boolean restoreThreadNameAtEnd,
long timeoutMS)
constructor of the process information holder.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
abort()
abort the process.
|
java.lang.String |
cancel()
cancel the process
|
void |
end()
end the process.
|
void |
forked(boolean flag)
fork the process.
|
long |
getHitsDB()
the hit count
|
long |
getLargeHitsDB()
the hit count
|
Login |
getLogin()
get the owner login of this process.
|
java.util.Date |
getPauseTime()
get the paused time for the process.
|
ProcessHandler |
getPreviousHandler()
The previous handler for this thread.
|
ServerProcess |
getProcess()
The actual process
|
long |
getProcessId()
the process id
|
java.lang.Thread |
getProcessThread()
get the thread running this process.
|
java.lang.String |
getProgressMsg()
get the progress message
|
long |
getRemaningTimeMS()
The time until we timeout
|
long |
getStartMS()
get Started time of this process
|
long |
getTimeOnDB()
The time on the database
|
long |
getTimeoutMS()
get the timeoutMS
|
boolean |
hasTimedOut()
is the process timed out
|
boolean |
isPaused()
Is the process paused ?
|
boolean |
isTerminated()
is the process terminated
|
java.lang.String |
pause()
pause the process.
|
java.lang.String |
resume()
resume the process.
|
void |
start()
abort the process.
|
public ProcessHandler(java.lang.Thread processThread, ServerProcess process, @Nullable Login owner, ProcessHandler previous, boolean restoreThreadNameAtEnd, long timeoutMS)
restoreThreadNameAtEnd
- should we restore the thread name when the process ends.processThread
- The process threadprevious
- the previous processprocess
- the processowner
- the ownertimeoutMS
- the timeoutpublic long getTimeoutMS()
@CheckReturnValue public long getHitsDB()
@CheckReturnValue public long getLargeHitsDB()
@CheckReturnValue public long getTimeOnDB()
@CheckReturnValue @Nullable public Login getLogin()
public void forked(boolean flag)
flag
- is forked ?@CheckReturnValue @Nonnull public java.lang.String getProgressMsg()
@CheckReturnValue @Nonnull public java.lang.Thread getProcessThread()
@CheckReturnValue @Nullable public ProcessHandler getPreviousHandler()
@CheckReturnValue public boolean isTerminated()
@CheckReturnValue public boolean hasTimedOut()
@CheckReturnValue public long getRemaningTimeMS()
@CheckReturnValue public ServerProcess getProcess()
@CheckReturnValue public long getProcessId()
@Nonnull public java.lang.String cancel() throws java.lang.Exception
java.lang.Exception
- a serious problem@Nonnull public java.lang.String abort() throws java.lang.Exception
java.lang.Exception
- A serious problempublic void start() throws java.lang.Exception
java.lang.Exception
- A serious problem@CheckReturnValue public long getStartMS()
@CheckReturnValue public boolean isPaused()
@CheckReturnValue @Nullable public java.util.Date getPauseTime()
@Nonnull public java.lang.String pause()
public void end()
@Nonnull public java.lang.String resume()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.