Package me.ahoo.cosid.segment
Class NextIdSegmentExpiredException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
me.ahoo.cosid.CosIdException
me.ahoo.cosid.segment.NextIdSegmentExpiredException
- All Implemented Interfaces:
Serializable
Exception thrown when a next ID segment is invalid.
This exception indicates that the provided next segment has an offset that is not greater than the current segment's offset, which would cause ID conflicts or duplication.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNextIdSegmentExpiredException(IdSegment current, IdSegment next) Creates a new exception. -
Method Summary
Modifier and TypeMethodDescriptionGets the current segment.getNext()Gets the invalid next segment.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NextIdSegmentExpiredException
Creates a new exception.- Parameters:
current- the current segmentnext- the invalid next segment
-
-
Method Details
-
getCurrent
Gets the current segment.- Returns:
- the current segment
-
getNext
Gets the invalid next segment.- Returns:
- the next segment
-