FileLockPacketPayloadTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Make file lock packet type explicit

`FileLockCommunicator` now includes an additional byte that represents

the `FileLockPacketType` when sending packets to other processes.

`DefaultFileLockContentionHandler` now checks for the

`LOCK_RELEASE_CONFIRMATION` type instead of interpreting any packet for

a lock for which it already has received a packet as a lock release

confirmation.

Adding the additional byte will be ignored by old versions which only

read the first 9 bytes. New versions can still read packets from old

versions that do not include the byte. They use the `UNKNOWN` type in

this case. Thus, this protocol change is backwards compatible.

    • -0
    • +66
    ./FileLockPacketPayloadTest.groovy
  1. … 5 more files in changeset.