saker.build Documentation TaskDoc JavaDoc Packages
public class SerializationConcurrentModificationException extends ConcurrentModificationException
Exception thrown when a serializing implementation encounters different number of items than expected.

This can happen if a serializer queries the size of a collection/map, and later sees less or more number of elements than previously queried. This can happen if the collection was concurrently modified between querying the size of it, and actually serializing the elements.

The getDifferenceCount() method can be used to check the relation whether less or more elements have been encountered.

Constructors
public
Creates a new instance with the given difference count.
Methods
public int
Gets the difference count relative to the expected serialization count.
Creates a new instance with the given difference count.
differenceCountThe difference count.
IllegalArgumentExceptionIf the difference count is 0.
public int getDifferenceCount()
Gets the difference count relative to the expected serialization count.

If the returned count is positive, it means that the serializer encountered less elements than expected. The returned number of elements were missing from the serialized collection.

If the number is negative, it means that the collections had more elements in the collection compared to the previously reported size. Negative numbers may not be accurate, meaning that there may be more elements than the negative result reports. E.g. if this method reports -1, then there may be more than one unserialized elements than just 1.

The element difference count of the serialization.