Class OngoingComputation
- java.lang.Object
-
- org.processmining.specpp.supervision.piping.AbstractObservable<O>
-
- org.processmining.specpp.supervision.piping.AbstractAsyncAwareObservable<ComputationEvent>
-
- org.processmining.specpp.prom.computations.OngoingComputation
-
- All Implemented Interfaces:
AsyncAwareObservable<ComputationEvent>,Observable<ComputationEvent>
- Direct Known Subclasses:
OngoingStagedComputation
public class OngoingComputation extends AbstractAsyncAwareObservable<ComputationEvent>
-
-
Constructor Summary
Constructors Constructor Description OngoingComputation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.DurationcalculateRemainingTime()java.time.DurationcalculateRuntime()java.lang.RunnablegetCancellationCallback()com.google.common.util.concurrent.ListenableFuture<?>getComputationFuture()java.time.LocalDateTimegetDeadline()java.time.LocalDateTimegetEnd()java.time.LocalDateTimegetStart()java.time.DurationgetTimeLimit()booleanhasEnded()booleanhasStarted()booleanhasTerminated()booleanhasTerminatedSuccessfully()booleanhasTimeLimit()booleanisCancelled()booleanisGracefullyCancelled()booleanisRunning()voidmarkEnded()voidmarkForciblyCancelled()voidmarkGracefullyCancelled()voidmarkStarted()voidsetCancellationCallback(java.lang.Runnable cancellationCallback)voidsetComputationFuture(com.google.common.util.concurrent.ListenableFuture<?> computationFuture)voidsetEnd(java.time.LocalDateTime end)voidsetStart(java.time.LocalDateTime start)voidsetTimeLimit(java.time.Duration timeLimit)java.lang.StringtoString()-
Methods inherited from class org.processmining.specpp.supervision.piping.AbstractAsyncAwareObservable
addObserver, getAsyncObservers, getNonAsyncObservers
-
Methods inherited from class org.processmining.specpp.supervision.piping.AbstractObservable
clearObservers, getObservers, publish, removeObserver
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.processmining.specpp.supervision.piping.AsyncAwareObservable
publishFutureToAsyncObservers, publishFutureToNonAsyncObservers
-
Methods inherited from interface org.processmining.specpp.supervision.piping.Observable
beObservedBy, clearObservers, getObservers, publish, removeObserver
-
-
-
-
Method Detail
-
getStart
public java.time.LocalDateTime getStart()
-
setStart
public void setStart(java.time.LocalDateTime start)
-
markStarted
public void markStarted()
-
getEnd
public java.time.LocalDateTime getEnd()
-
setEnd
public void setEnd(java.time.LocalDateTime end)
-
markEnded
public void markEnded()
-
getTimeLimit
public java.time.Duration getTimeLimit()
-
setTimeLimit
public void setTimeLimit(java.time.Duration timeLimit)
-
calculateRemainingTime
public java.time.Duration calculateRemainingTime()
-
markGracefullyCancelled
public void markGracefullyCancelled()
-
markForciblyCancelled
public void markForciblyCancelled()
-
isCancelled
public boolean isCancelled()
-
isGracefullyCancelled
public boolean isGracefullyCancelled()
-
getComputationFuture
public com.google.common.util.concurrent.ListenableFuture<?> getComputationFuture()
-
setComputationFuture
public void setComputationFuture(com.google.common.util.concurrent.ListenableFuture<?> computationFuture)
-
getCancellationCallback
public java.lang.Runnable getCancellationCallback()
-
setCancellationCallback
public void setCancellationCallback(java.lang.Runnable cancellationCallback)
-
hasStarted
public boolean hasStarted()
-
hasEnded
public boolean hasEnded()
-
hasTimeLimit
public boolean hasTimeLimit()
-
isRunning
public boolean isRunning()
-
calculateRuntime
public java.time.Duration calculateRuntime()
-
hasTerminatedSuccessfully
public boolean hasTerminatedSuccessfully()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDeadline
public java.time.LocalDateTime getDeadline()
-
hasTerminated
public boolean hasTerminated()
-
-