asposecells.api

Class SystemTimeInterruptMonitor

Simple implementation of AbstractInterruptMonitor by checking and comparing current system time with user specified limit.
This implementation is just a simple solution for simple scenarios. It needs to frequently retrieve and check the system time so itself may have a negative impact on performance to some extent.

Constructor Summary
SystemTimeInterruptMonitor(terminateWithoutException)
Constructs one interruption monitor.
 
Property Getters/Setters Summary
methodisInterruptionRequested()
This implementation just checks whether the time cost(from the time when starting this monitor to now) is greater than user specified limit.
methodgetTerminateWithoutException()
See TerminateWithoutException. This property is specified by user when constructing this monitor instance.
 
Method Summary
methodstartMonitor(msLimit)
Starts the monitor with the specified time limit. The start time to calculate time cost is just when this method is called, so the procedure which needs to be monitored should be started just after this call.
 

    • Constructor Detail

      • SystemTimeInterruptMonitor

        SystemTimeInterruptMonitor(terminateWithoutException)
        Constructs one interruption monitor.
        Parameters:
        terminateWithoutException: boolean - TerminateWithoutException
    • Property Getters/Setters Detail

      • isInterruptionRequested : boolean 

        boolean isInterruptionRequested()
        
        This implementation just checks whether the time cost(from the time when starting this monitor to now) is greater than user specified limit.
      • getTerminateWithoutException : boolean 

        boolean getTerminateWithoutException()
        
        See TerminateWithoutException. This property is specified by user when constructing this monitor instance.
    • Method Detail

      • startMonitor

         startMonitor(msLimit)
        Starts the monitor with the specified time limit. The start time to calculate time cost is just when this method is called, so the procedure which needs to be monitored should be started just after this call.
        Parameters:
        msLimit: int - time limit(ms) to require the interruption.