com.sap.scheduler.api

Class Filter

java.lang.Object
  extended by com.sap.scheduler.api.Filter
All Implemented Interfaces:
Serializable

public final class Filter
extends Object
implements Serializable

Instances of this class are used by the scheduler to filter out timeout events. I.e. job instances generated by some scheduler task may not be executed during the time frame startTime -endTime. It is the scheduler that decides which jobs may be filtered out by this filter. For example the scheduler may use a given filter to suppress occurences only of a given scheduler task or it may use the filter to suppress expirations of all timer tasks.Instances of this class are immutable. It does not provide set methods and instances of SchedulerTime, aggregated by Filter are also immutable.

See Also:
Serialized Form

Constructor Summary
Filter(SchedulerTime startTime, SchedulerTime endTime)
          Creates new instance of Filter for the specified time period
 
Method Summary
 boolean compareFilter(Filter entry)
          Compares a Filter with this.
 boolean filterOut(long time)
          Checks if the given time is to be filtered out
 boolean filterOut(SchedulerTime time)
          Checks if the given time is to be filtered out
 SchedulerTime getEndTime()
          Obtains the end time of the filter
 SchedulerTime getStartTime()
          Obtains the start time of the filter
 String toString()
          Returns a string representation of the filter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Filter

public Filter(SchedulerTime startTime,
              SchedulerTime endTime)
Creates new instance of Filter for the specified time period

Parameters:
startTime - - start time of the filter
endTime - - end time of the filter
Method Detail

getStartTime

public SchedulerTime getStartTime()
Obtains the start time of the filter

Returns:
the start time of the filter

getEndTime

public SchedulerTime getEndTime()
Obtains the end time of the filter

Returns:
the end time of the filter

filterOut

public boolean filterOut(SchedulerTime time)
Checks if the given time is to be filtered out

Parameters:
time - the specified scheduler time
Returns:
TRUE if the time is to be filtered out, FALSE if not

filterOut

public boolean filterOut(long time)
Checks if the given time is to be filtered out

Parameters:
time - the specified time in milliseconds
Returns:
TRUE if the time is to be filtered out, FALSE if not

toString

public String toString()
Returns a string representation of the filter

Overrides:
toString in class Object
Returns:
the string representation

compareFilter

public boolean compareFilter(Filter entry)
Compares a Filter with this.

Parameters:
entry - the Filter to compare
Returns:
true if the Filter are equals in case of StartTime, EndTime otherwise false.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] ENGFACADE [sap.com] tc/je/scheduler/api api BC-JAS


Copyright 2014 SAP AG Complete Copyright Notice