Record Class StorageResult.PartialFailureResult<T>
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.model.data.StorageResult.PartialFailureResult<T>
- Type Parameters:
T
- The type of data that was stored- Record Components:
qualityCode
- TheQualityCode
indicating the partial failure of the operationsuccessfulData
- TheList
of successfully storedT
failedData
- TheList
ofT
that failed to be storederror
- AnOptional
Exception
that may have occurred during the operation
- All Implemented Interfaces:
StorageResult<T>
- Enclosing interface:
- StorageResult<T>
public static record StorageResult.PartialFailureResult<T>(QualityCode qualityCode, List<T> successfulData, List<T> failedData, Optional<Exception> error)
extends Record
implements StorageResult<T>
Represents a partially failed storage operation where some data were stored
successfully and others failed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.historian.common.model.data.StorageResult
StorageResult.ExceptionResult<T>, StorageResult.FailureResult<T>, StorageResult.NoneResult<T>, StorageResult.PartialFailureResult<T>, StorageResult.SuccessResult<T>, StorageResult.Type
-
Constructor Summary
ConstructorsConstructorDescriptionPartialFailureResult
(QualityCode qualityCode, List<T> successfulData, List<T> failedData, Optional<Exception> error) Creates an instance of aPartialFailureResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.error()
Returns the value of theerror
record component.Returns the value of thefailedData
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of thequalityCode
record component.Returns the value of thesuccessfulData
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the exact type that this storage result represents.
-
Constructor Details
-
PartialFailureResult
public PartialFailureResult(QualityCode qualityCode, List<T> successfulData, List<T> failedData, Optional<Exception> error) Creates an instance of aPartialFailureResult
record class.- Parameters:
qualityCode
- the value for thequalityCode
record componentsuccessfulData
- the value for thesuccessfulData
record componentfailedData
- the value for thefailedData
record componenterror
- the value for theerror
record component
-
-
Method Details
-
error
Returns the value of theerror
record component.- Specified by:
error
in interfaceStorageResult<T>
- Returns:
- the value of the
error
record component
-
type
Description copied from interface:StorageResult
Returns the exact type that this storage result represents.- Specified by:
type
in interfaceStorageResult<T>
- Returns:
- the result
StorageResult.Type
-
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)
. -
qualityCode
Returns the value of thequalityCode
record component.- Specified by:
qualityCode
in interfaceStorageResult<T>
- Returns:
- the value of the
qualityCode
record component
-
successfulData
Returns the value of thesuccessfulData
record component.- Specified by:
successfulData
in interfaceStorageResult<T>
- Returns:
- the value of the
successfulData
record component
-
failedData
Returns the value of thefailedData
record component.- Specified by:
failedData
in interfaceStorageResult<T>
- Returns:
- the value of the
failedData
record component
-