]
Ryan Emerson updated ISPN-11316:
--------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request:
Split XSiteStateTransferControlCommand into individual commands
---------------------------------------------------------------
Key: ISPN-11316
URL:
https://issues.redhat.com/browse/ISPN-11316
Project: Infinispan
Issue Type: Enhancement
Components: Core
Affects Versions: 11.0.0.Alpha1
Reporter: Ryan Emerson
Assignee: Ryan Emerson
Priority: Major
Fix For: 11.0.0.Beta1
Currently the XSiteControlCommand uses a Type field and a switch statement to
differentiate between various actions. This worked well for the old Externalizer
approach, however it does not fit well with protobuf messages. Instead, the command should
be split into individual commands.
This enables the logic of the command types to be separated, making it easier to maintain
backwards compatibility in the long term. Each command will use a ProtoStream TypeId in
the range of 1000 -> 3999, so the cost of two bytes is the same as the existing class
ID plus enum Type.