Class JGroupsRaftSerializationException

All Implemented Interfaces:
Serializable

public class JGroupsRaftSerializationException extends JRaftException
Exception thrown when serialization or deserialization operations fail.

This exception is thrown by the binary serialization framework when errors occur during object encoding or decoding. It wraps underlying I/O exceptions or other failures to provide a consistent exception hierarchy for JGroups Raft errors.

Common Causes

  • I/O failures: Writing to or reading from streams fails
  • Buffer overflow: Data exceeds buffer capacity (rare due to auto-growth)
  • Encoding errors: String encoding fails (e.g., invalid UTF-8)
  • Wire format errors: Corrupted data or version mismatches during deserialization

Handling Strategy

Serialization failures are typically non-recoverable at the serialization layer. Callers should:

  • Log the error with full stack trace for debugging
  • Propagate to higher layers (e.g., as a Raft command failure)
  • Consider the operation failed (do not retry at serialization level)
Since:
2.0
Author:
José Bolina
See Also:
  • Constructor Details

    • JGroupsRaftSerializationException

      public JGroupsRaftSerializationException(String message, Throwable cause)