jclouds/jclouds — pull request #1438 by shrinandj (2013-03-19 18:57:32+00:00)
Title: Use multi-object delete for AWS-S3.

This is further to pull request 1391 (https://github.com/jclouds/jclouds/pull/1391) which I had cancelled because there weren't any mock tests. I've added the mock tests in this commit.

This code seems good to start using the multi-object delete. I will be doing more commits on this code, structuring it better and adding more tests as we go along.

This commit implements a clearContainer strategy (as well as a clearList strategy) specifically for AWS-S3. It uses the multi-object delete option already exported by the S3 api. This way, 1000 keys can be deleted with one single http request.

Also added:
i) Unit tests using EasyMock.
ii) a live test for making sure that clearContainer works.

Testing done:
1) Ran unit tests introduced by AWSS3DeleteAllKeysInListTests.
2) Lots of live testing against a real AWS container.