Package org.eclipse.scanning.api
Class AbstractNameableTimeoutable
java.lang.Object
org.eclipse.scanning.api.AbstractNameable
org.eclipse.scanning.api.AbstractNameableTimeoutable
- All Implemented Interfaces:
INameable,ITimeoutable
- Direct Known Subclasses:
AbstractDetectorModel,AbstractScannable,GenericModel
Default implementations of functions in
INameable and ITimeoutable
These implementations should be adequate for most classes.
- Since:
- GDA 9.20
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongThis is the timeout time in seconds which defaults to -1 If set the default timeout for an action on a device will use this value.inthashCode()voidsetTimeout(long timeout) toString()Methods inherited from class org.eclipse.scanning.api.AbstractNameable
getName, setName
-
Constructor Details
-
AbstractNameableTimeoutable
public AbstractNameableTimeoutable()
-
-
Method Details
-
getTimeout
public long getTimeout()Description copied from interface:ITimeoutableThis is the timeout time in seconds which defaults to -1 If set the default timeout for an action on a device will use this value. For instance for detectors the run and write time will timeout if this field is set>0 or 10 seconds if none of the detector models have this field set. For scannables the IScannable interface extends this interface. If any motor at a given level implements this timeout, this time out (or the max of all the timeouts) will be used. If none are set the default is three minutes.- Specified by:
getTimeoutin interfaceITimeoutable- Returns:
-
setTimeout
public void setTimeout(long timeout) - Specified by:
setTimeoutin interfaceITimeoutable- Parameters:
timeout- in seconds
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractNameable
-
equals
- Overrides:
equalsin classAbstractNameable
-
toString
- Overrides:
toStringin classAbstractNameable
-