KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > prevayler > demos > scalability > prevayler > PrevaylerScalabilitySubject


1 package org.prevayler.demos.scalability.prevayler;
2
3 import org.prevayler.Prevayler;
4 import org.prevayler.demos.scalability.ScalabilityTestSubject;
5
6 abstract class PrevaylerScalabilitySubject implements ScalabilityTestSubject {
7
8     protected Prevayler prevayler;
9
10     
11     {System.gc();}
12
13
14     public String JavaDoc name() { return "Prevayler"; }
15
16
17     public void replaceAllRecords(int records) {
18         try {
19
20             prevayler.execute(new AllRecordsReplacement(records));
21
22         } catch (Exception JavaDoc ex) {
23             ex.printStackTrace();
24             throw new RuntimeException JavaDoc("Unexpected Exception: " + ex);
25         }
26     }
27 }
28
Popular Tags