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
ConstructorsModifierConstructorDescriptionprivateWorkUnitWrapper(T unit, com.google.common.util.concurrent.SettableFuture<R> future, com.codahale.metrics.Timer.Context timer) Creates an instance of aWorkUnitWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.com.google.common.util.concurrent.SettableFuture<R> future()Returns the value of thefuturerecord component.final inthashCode()Returns a hash code value for this object.com.codahale.metrics.Timer.Contexttimer()Returns the value of thetimerrecord component.final StringtoString()Returns a string representation of this record class.unit()Returns the value of theunitrecord component.
-
Field Details
-
unit
The field for theunitrecord component. -
future
The field for thefuturerecord component. -
timer
private final com.codahale.metrics.Timer.Context timerThe field for thetimerrecord 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 aWorkUnitWrapperrecord class.- Parameters:
unit- the value for theunitrecord componentfuture- the value for thefuturerecord componenttimer- the value for thetimerrecord 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 theunitrecord component.- Returns:
- the value of the
unitrecord component
-
future
Returns the value of thefuturerecord component.- Returns:
- the value of the
futurerecord component
-
timer
public com.codahale.metrics.Timer.Context timer()Returns the value of thetimerrecord component.- Returns:
- the value of the
timerrecord component
-