T - the type of the data being migrated.@PublicEvolving public final class CompatibilityResult<T> extends Object
CompatibilityResult contains information about whether or not data migration
is required in order to continue using new serializers for previously serialized data.| Modifier and Type | Method and Description |
|---|---|
static <T> CompatibilityResult<T> |
compatible()
Returns a result that signals that the new serializer is compatible and no migration is required.
|
TypeDeserializer<T> |
getConvertDeserializer() |
boolean |
isRequiresMigration() |
static <T> CompatibilityResult<T> |
requiresMigration()
Returns a result that signals migration to be performed.
|
static <T> CompatibilityResult<T> |
requiresMigration(TypeDeserializer<T> convertDeserializer)
Returns a result that signals migration to be performed, and in the case that the preceding serializer
cannot be found or restored to read the previous data during migration, a provided convert deserializer
can be used.
|
public static <T> CompatibilityResult<T> compatible()
public static <T> CompatibilityResult<T> requiresMigration(TypeDeserializer<T> convertDeserializer)
convertDeserializer - the convert deserializer to use, in the case that the preceding serializer
cannot be found.public static <T> CompatibilityResult<T> requiresMigration()
You can also provide a convert deserializer using requiresMigration(TypeDeserializer),
which will be used as a fallback resort in such cases.
public TypeDeserializer<T> getConvertDeserializer()
public boolean isRequiresMigration()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.