Record Class TemporalPointBatch<P extends TemporalPoint<?,?>>
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.storage.TemporalPointBatch<P>
- Type Parameters:
P
- The type of temporal points in the batch.
public record TemporalPointBatch<P extends TemporalPoint<?,?>> (List<P extends TemporalPoint<?,?>> points, CompletableFuture<StorageResult<P extends TemporalPoint<?,?>>> result)
extends Record
A record representing a batch of temporal points and their associated storage result.
-
Constructor Summary
ConstructorsConstructorDescriptionTemporalPointBatch
(List<P> points, CompletableFuture<StorageResult<P>> result) Constructs a new TemporalPointBatch. -
Method Summary
Modifier and TypeMethodDescriptionstatic <P extends TemporalPoint<?,
?>>
TemporalPointBatch<P>combine
(List<TemporalPointBatch<P>> batches) Combines multiple TemporalPointBatch instances into a single batch.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static <P extends TemporalPoint<?,
?>>
TemporalPointBatch<P>Creates a new TemporalPointBatch with the given list of points.points()
Returns the value of thepoints
record component.Retrieves the type of the temporal points in the batch.result()
Returns the value of theresult
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TemporalPointBatch
Constructs a new TemporalPointBatch.- Throws:
NullPointerException
- if the points list is null.IllegalArgumentException
- if the points list is empty.
-
-
Method Details
-
pointType
Retrieves the type of the temporal points in the batch.- Returns:
- The type of the temporal points.
-
of
Creates a new TemporalPointBatch with the given list of points.- Type Parameters:
P
- The type of temporal points.- Parameters:
points
- The list of temporal points.- Returns:
- A new TemporalPointBatch instance.
-
combine
public static <P extends TemporalPoint<?,?>> TemporalPointBatch<P> combine(List<TemporalPointBatch<P>> batches) Combines multiple TemporalPointBatch instances into a single batch.- Type Parameters:
P
- The type of temporal points in the batches.- Parameters:
batches
- The list of TemporalPointBatch instances to combine.- Returns:
- A new TemporalPointBatch containing all points from the input batches.
-
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)
. -
points
Returns the value of thepoints
record component.- Returns:
- the value of the
points
record component
-
result
Returns the value of theresult
record component.- Returns:
- the value of the
result
record component
-