1 package com.quadcap.sql.file; 2 3 40 41 import java.io.File ; 42 import java.io.IOException ; 43 44 import java.util.Properties ; 45 46 import com.quadcap.sql.lock.Transaction; 47 48 53 public interface Log { 54 57 public void init(Datafile db, boolean create, Properties props) 58 throws IOException ; 59 60 63 public void start(); 64 65 68 public Datafile getDatafile(); 69 70 75 78 public void addEntry(LogEntry entry) throws IOException ; 79 80 83 public void reallyAddEntry(LogEntry entry) throws IOException ; 84 85 88 public void close() throws IOException ; 89 90 93 public void flushLog() throws IOException ; 94 95 98 public void checkpoint() throws IOException ; 99 100 103 public void sync() throws IOException ; 104 105 108 public void rollbackTransaction(Transaction trans) throws IOException ; 109 110 113 public void rollbackStatement(Transaction trans, int stmtId) 114 throws IOException ; 115 116 119 public void restart() throws Exception ; 120 121 124 public long getRowMap(long rowId); 125 126 134 public void putRowMap(long logRow, long fileRow); 135 136 139 public void removeRowMap(long row); 140 141 144 public boolean isLogging(); 145 146 149 public void saveBlock(long b) throws IOException ; 150 151 154 public void restoreBlocks() throws IOException ; 155 156 159 public void resetBlocks() throws IOException ; 160 161 164 public void remove() throws IOException ; 165 166 169 public boolean inRecovery() throws IOException ; 170 } 171 | Popular Tags |