Properties props = getNodeProps();
props.setProperty(DataServiceImplClass + ".detect.modifications",
String.valueOf(detectMods));
props.setProperty("com.sun.sgs.txn.timeout", "10000");
serverNode = new SgsTestNode("TestDataServicePerformance", null, props);
final DataService service = serverNode.getDataService();
TransactionScheduler txnScheduler = serverNode.getSystemRegistry().
getComponent(TransactionScheduler.class);
Identity taskOwner = serverNode.getProxy().getCurrentOwner();
txnScheduler.runTask(new TestAbstractKernelRunnable() {
public void run() {
service.setBinding("counters", new Counters(items));
}}, taskOwner);
for (int r = 0; r < repeat; r++) {
long start = System.currentTimeMillis();
for (int c = 0; c < count; c++) {
txnScheduler.runTask(new TestAbstractKernelRunnable() {
public void run() throws Exception {
Counters counters =
(Counters) service.getBinding("counters");
for (int i = 0; i < items; i++) {
counters.get(i);
}
}}, taskOwner);
}