1 21 22 package org.continuent.sequoia.controller.recoverylog; 23 24 import org.continuent.sequoia.common.xml.DatabasesXmlTags; 25 26 32 public class HSQLEmbeddedRecoveryLog extends RecoveryLog 33 { 34 private String dataPath; 35 36 41 public HSQLEmbeddedRecoveryLog(String dataPath) 42 { 43 super(null, "org.hsqldb.jdbcDriver", "jdbc:hsqldb:file:" + dataPath 44 + ";hsqldb.cache_file_scale=8;shutdown=true", "SA", "", 60, 10); 45 this.setLogTableCreateStatement("CREATE CACHED TABLE", "RECOVERY", 46 "BIGINT NOT NULL", "VARCHAR NOT NULL", "sql", "VARCHAR NOT NULL", 47 "VARCHAR", "CHAR(1) NOT NULL", "BIGINT NOT NULL", "BIGINT", "BIGINT", 48 "INT", ",PRIMARY KEY (log_id)"); 49 this.setCheckpointTableCreateStatement("CREATE CACHED TABLE", "CHECKPOINT", 50 "VARCHAR NOT NULL", "BIGINT", ",PRIMARY KEY (name)"); 51 this.setBackendTableCreateStatement("CREATE CACHED TABLE", "BACKEND", 52 "VARCHAR NOT NULL", "VARCHAR NOT NULL", "INTEGER", "VARCHAR NOT NULL", 53 ""); 54 this.setDumpTableCreateStatement("CREATE CACHED TABLE", "DUMP", 55 "VARCHAR NOT NULL", "TIMESTAMP", "VARCHAR NOT NULL", 56 "VARCHAR NOT NULL", "VARCHAR NOT NULL", "VARCHAR NOT NULL", "tables", 57 "VARCHAR NOT NULL", ""); 58 this.dataPath = dataPath; 59 } 60 61 66 public String getXml() 67 { 68 return "<" + DatabasesXmlTags.ELT_EmbeddedRecoveryLog + " " 69 + DatabasesXmlTags.ATT_dataPath + "=" + dataPath + ">"; 70 } 71 72 } 73 | Popular Tags |