Record Class StorageResult.SuccessResult<T>
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.common.model.data.StorageResult.SuccessResult<T>
- Type Parameters:
T- The type of data that was stored- Record Components:
qualityCode- TheQualityCodeindicating the success of the operationsuccessfulData- TheListof successfully storedT
- All Implemented Interfaces:
StorageResult<T>
- Enclosing interface:
- StorageResult<T>
public static record StorageResult.SuccessResult<T>(QualityCode qualityCode, List<T> successfulData)
extends Record
implements StorageResult<T>
Represents a fully successful storage operation where all data were stored successfully.
-
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
ConstructorsConstructorDescriptionSuccessResult(QualityCode qualityCode, List<T> successfulData) Creates an instance of aSuccessResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.error()Returns an Optional containing the exception if one occurred during the storage operation.Returns the list of data that failed to be stored.final inthashCode()Returns a hash code value for this object.Returns the value of thequalityCoderecord component.Returns the value of thesuccessfulDatarecord component.final StringtoString()Returns a string representation of this record class.type()Returns the exact type that this storage result represents.
-
Constructor Details
-
SuccessResult
Creates an instance of aSuccessResultrecord class.- Parameters:
qualityCode- the value for thequalityCoderecord componentsuccessfulData- the value for thesuccessfulDatarecord component
-
-
Method Details
-
failedData
Description copied from interface:StorageResultReturns the list of data that failed to be stored.- Specified by:
failedDatain interfaceStorageResult<T>- Returns:
- an unmodifiable
ListofTthat failed to be stored
-
error
Description copied from interface:StorageResultReturns an Optional containing the exception if one occurred during the storage operation.- Specified by:
errorin interfaceStorageResult<T>- Returns:
- an
OptionalofException, empty if no exception occurred
-
type
Description copied from interface:StorageResultReturns the exact type that this storage result represents.- Specified by:
typein 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 thequalityCoderecord component.- Specified by:
qualityCodein interfaceStorageResult<T>- Returns:
- the value of the
qualityCoderecord component
-
successfulData
Returns the value of thesuccessfulDatarecord component.- Specified by:
successfulDatain interfaceStorageResult<T>- Returns:
- the value of the
successfulDatarecord component
-