se.gawell.fakeriak.servlet.InMemoryDeleteHandler Maven / Gradle / Ivy
The newest version!
package se.gawell.fakeriak.servlet;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import se.gawell.fakeriak.buckets.Buckets;
import se.gawell.fakeriak.index.Indexes;
public class InMemoryDeleteHandler extends InMemoryHandler implements DeleteHandler {
public InMemoryDeleteHandler(Buckets buckets, Indexes indexes) {
super(buckets, indexes);
}
@Override
public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException {
String bucketName = getBucketName(request);
String key = getKey(request);
getBucket(bucketName).remove(key);
indexes.deleteKey(bucketName, key);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy