1 19 20 package org.polepos.teams.prevayler.sepang; 21 22 import org.polepos.circuits.sepang.*; 23 import org.polepos.teams.prevayler.*; 24 25 28 public class SepangPrevaylerDriver extends PrevaylerDriver implements SepangDriver{ 29 30 private final SepangSystem _sepangSystem = (SepangSystem)_prevayler.prevalentSystem(); 31 32 public void write() { 33 _prevayler.execute(new TreeCreationTransaction(setup().getTreeDepth())); 34 } 35 36 public void read(){ 37 Tree.traverse(_sepangSystem.tree(), new TreeVisitor() { 38 public void visit(Tree tree) { 39 addToCheckSum(tree.getDepth()); 40 } 41 }); 42 } 43 44 public void read_hot() { 45 read(); 46 } 47 48 public void delete() { 49 _prevayler.execute(new TreeDeletionTransaction()); 50 } 51 52 protected Object prevalentSystem() { 53 return new SepangSystem(); 54 } 55 56 } 57 | Popular Tags |