*/
public Void execute() throws RiakException {
if(fetchBeforeDelete) {
Callable<RiakResponse> fetch = new Callable<RiakResponse>() {
public RiakResponse call() throws Exception {
RiakResponse response = client.head(bucket, key, fetchMetaBuilder.build());
return response;
}
};
RiakResponse response = retrier.attempt(fetch);
// If there's only one object, and it's a tombstone ... just bail.
// It's like, how much more deleted could this be?
// And the answer is none. None more deleted.
if (response.numberOfValues() == 1 && response.getRiakObjects()[0].isDeleted())
{
return null;
}
deleteMetaBuilder.vclock(response.getVclock());
}
Callable<Void> command = new Callable<Void>() {
public Void call() throws Exception {
client.delete(bucket, key, deleteMetaBuilder.build());