A clear() Java API on Partitioned Region
- Acquires a distributed lock
- Declares itself the co-ordinator
- Gets the primary list of buckets and sends clear messages
- After primaries are cleared and then clear messages are sent to the secondaries
If all the steps are successful then API return success
- Unit tests to have complete code coverage
- DUnit tests where clear op on Partitioned Region is successful (Region size = 0)
- DUnit test where all concurrent clear() calls are made. One operation should succeed while sending appropriate messages to the failing API calls
- Test coverage for PartitionedRegion with redundancy levels of 0 and more.
- Test coverage to when a member departs in this scenario
- Test coverage to when a member restarts in this scenario
Analyze if there needs to be tests for offheap regions. If it is needed then write the tests and make the appropriate code changes to make the offheap tests pass.