Class AbstractVersionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.opendaylight.controller.cluster.datastore.persisted.AbstractVersionException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FutureVersionException,PastVersionException
@Beta public abstract class AbstractVersionException extends Exception
Abstract base exception used for reporting version mismatches fromPayloadVersion.- Author:
- Robert Varga
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull PayloadVersiongetClosestVersion()Return the closest version supported by this codebase.intgetVersion()Return the numeric version which has caused this exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getVersion
public final int getVersion()
Return the numeric version which has caused this exception.- Returns:
- Numeric version
-
getClosestVersion
public final @NonNull PayloadVersion getClosestVersion()
Return the closest version supported by this codebase.- Returns:
- Closest supported
PayloadVersion
-
-