Record Class ExpirationStrategy.Inactivity
java.lang.Object
java.lang.Record
io.github.kaktushose.jdac.dispatching.expiration.ExpirationStrategy.Inactivity
- Record Components:
afterMinutes- the amount of time after aRuntimeshould be closed, in minutes.
- All Implemented Interfaces:
ExpirationStrategy
- Enclosing interface:
ExpirationStrategy
public static record ExpirationStrategy.Inactivity(long afterMinutes)
extends Record
implements ExpirationStrategy
ExpirationStrategy that closes a Runtime after the passed amount of time.-
Nested Class Summary
Nested classes/interfaces inherited from interface ExpirationStrategy
ExpirationStrategy.Explicit, ExpirationStrategy.Inactivity -
Field Summary
Fields inherited from interface ExpirationStrategy
AFTER_15_MINUTES, EXPLICIT -
Constructor Summary
ConstructorsConstructorDescriptionInactivity(long afterMinutes) Creates an instance of aInactivityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of theafterMinutesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Inactivity
public Inactivity(long afterMinutes) Creates an instance of aInactivityrecord class.- Parameters:
afterMinutes- the value for theafterMinutesrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
afterMinutes
public long afterMinutes()Returns the value of theafterMinutesrecord component.- Returns:
- the value of the
afterMinutesrecord component
-