01: package org.shiftone.cache.test.benchmark;
02:
03: import org.shiftone.cache.Cache;
04: import org.shiftone.cache.test.benchmark.Benchmark;
05:
06: /**
07: * @version $Revision: 1.1 $
08: * @author $Author: jeffdrost $
09: */
10: public class RemoveBenchmark implements Benchmark {
11:
12: private String name;
13: private Object[] keys;
14:
15: public RemoveBenchmark(String name, Object[] keys) {
16: this .keys = keys;
17: this .name = name;
18: }
19:
20: public void run(Cache cache) {
21:
22: for (int i = 0; i < keys.length; i++) {
23: cache.remove(keys[i]);
24: }
25: }
26:
27: public String toString() {
28: return name;
29: }
30: }
|