Package com.vireocode.vireo.offline
Record Class OfflineSyncCommandResultDto
java.lang.Object
java.lang.Record
com.vireocode.vireo.offline.OfflineSyncCommandResultDto
public record OfflineSyncCommandResultDto(UUID commandId, boolean success, int status, String error, OfflineSyncResultReason reason)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionOfflineSyncCommandResultDto(UUID commandId, boolean success, int status, String error) Convenience constructor for replay handlers: a successful replay isOfflineSyncResultReason.APPLIED, while any failure raised by a handler is transient and thereforeOfflineSyncResultReason.RETRYABLE.OfflineSyncCommandResultDto(UUID commandId, boolean success, int status, String error, OfflineSyncResultReason reason) Creates an instance of aOfflineSyncCommandResultDtorecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecommandIdrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.intstatus()Returns the value of thestatusrecord component.booleansuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OfflineSyncCommandResultDto
Convenience constructor for replay handlers: a successful replay isOfflineSyncResultReason.APPLIED, while any failure raised by a handler is transient and thereforeOfflineSyncResultReason.RETRYABLE. -
OfflineSyncCommandResultDto
public OfflineSyncCommandResultDto(UUID commandId, boolean success, int status, String error, OfflineSyncResultReason reason) Creates an instance of aOfflineSyncCommandResultDtorecord class.- Parameters:
commandId- the value for thecommandIdrecord componentsuccess- the value for thesuccessrecord componentstatus- the value for thestatusrecord componenterror- the value for theerrorrecord componentreason- the value for thereasonrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
commandId
Returns the value of thecommandIdrecord component.- Returns:
- the value of the
commandIdrecord component
-
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
status
public int status()Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-