Package ch.rswk.meta.engine
Record Class AbstractEngineWorkQueueService.WorkUnitWrapper<T,R>
java.lang.Object
java.lang.Record
ch.rswk.meta.engine.AbstractEngineWorkQueueService.WorkUnitWrapper<T,R>
- Enclosing class:
AbstractEngineWorkQueueService<C,
T, R>
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
WorkUnitWrapper
(T unit, com.google.common.util.concurrent.SettableFuture<R> future, com.codahale.metrics.Timer.Context timer) Creates an instance of aWorkUnitWrapper
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.com.google.common.util.concurrent.SettableFuture
<R> future()
Returns the value of thefuture
record component.final int
hashCode()
Returns a hash code value for this object.com.codahale.metrics.Timer.Context
timer()
Returns the value of thetimer
record component.final String
toString()
Returns a string representation of this record class.unit()
Returns the value of theunit
record component.
-
Field Details
-
unit
The field for theunit
record component. -
future
The field for thefuture
record component. -
timer
private final com.codahale.metrics.Timer.Context timerThe field for thetimer
record component.
-
-
Constructor Details
-
WorkUnitWrapper
private WorkUnitWrapper(T unit, com.google.common.util.concurrent.SettableFuture<R> future, com.codahale.metrics.Timer.Context timer) Creates an instance of aWorkUnitWrapper
record class.- Parameters:
unit
- the value for theunit
record componentfuture
- the value for thefuture
record componenttimer
- the value for thetimer
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 withObjects::equals(Object,Object)
. -
unit
Returns the value of theunit
record component.- Returns:
- the value of the
unit
record component
-
future
Returns the value of thefuture
record component.- Returns:
- the value of the
future
record component
-
timer
public com.codahale.metrics.Timer.Context timer()Returns the value of thetimer
record component.- Returns:
- the value of the
timer
record component
-