Class Migration.MigrationWriteResult<TWriteResult>
- java.lang.Object
-
- com.launchdarkly.sdk.server.migrations.Migration.MigrationWriteResult<TWriteResult>
-
- Type Parameters:
TWriteResult
- The result type of the write.
- Enclosing class:
- Migration<TReadResult,TWriteResult,TReadInput,TWriteInput>
public static final class Migration.MigrationWriteResult<TWriteResult> extends java.lang.Object
The result of a migration write.A migration write result will always include an authoritative result, and it may contain a non-authoritative result.
Not all migration stages will execute both writes, and in the case of a write error from the authoritative source then the non-authoritative write will not be executed.
-
-
Constructor Summary
Constructors Constructor Description MigrationWriteResult(Migration.MigrationResult<TWriteResult> authoritative)
MigrationWriteResult(Migration.MigrationResult<TWriteResult> authoritative, Migration.MigrationResult<TWriteResult> nonAuthoritative)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Migration.MigrationResult<TWriteResult>
getAuthoritative()
Get the authoritative result of the write.java.util.Optional<Migration.MigrationResult<TWriteResult>>
getNonAuthoritative()
Get the non-authoritative result.
-
-
-
Constructor Detail
-
MigrationWriteResult
public MigrationWriteResult(@NotNull Migration.MigrationResult<TWriteResult> authoritative)
-
MigrationWriteResult
public MigrationWriteResult(@NotNull Migration.MigrationResult<TWriteResult> authoritative, @Nullable Migration.MigrationResult<TWriteResult> nonAuthoritative)
-
-
Method Detail
-
getAuthoritative
public Migration.MigrationResult<TWriteResult> getAuthoritative()
Get the authoritative result of the write.- Returns:
- the authoritative result
-
getNonAuthoritative
public java.util.Optional<Migration.MigrationResult<TWriteResult>> getNonAuthoritative()
Get the non-authoritative result.- Returns:
- the result, or an empty optional if no result was generated
-
-