| 1 |
/* |
| 2 |
* Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0, |
| 3 |
* and the EPL 1.0 (https://h2database.com/html/license.html). |
| 4 |
* Initial Developer: H2 Group |
| 5 |
*/ |
| 6 |
package org.h2.store.fs; |
| 7 |
|
| 8 |
/** |
| 9 |
* A recorder for the recording file system. |
| 10 |
*/ |
| 11 |
public interface Recorder { |
| 12 |
|
| 13 |
/** |
| 14 |
* Create a new file. |
| 15 |
*/ |
| 16 |
int CREATE_NEW_FILE = 2; |
| 17 |
|
| 18 |
/** |
| 19 |
* Create a temporary file. |
| 20 |
*/ |
| 21 |
int CREATE_TEMP_FILE = 3; |
| 22 |
|
| 23 |
/** |
| 24 |
* Delete a file. |
| 25 |
*/ |
| 26 |
int DELETE = 4; |
| 27 |
|
| 28 |
/** |
| 29 |
* Open a file output stream. |
| 30 |
*/ |
| 31 |
int OPEN_OUTPUT_STREAM = 5; |
| 32 |
|
| 33 |
/** |
| 34 |
* Rename a file. The file name contains the source and the target file |
| 35 |
* separated with a colon. |
| 36 |
*/ |
| 37 |
int RENAME = 6; |
| 38 |
|
| 39 |
/** |
| 40 |
* Truncate the file. |
| 41 |
*/ |
| 42 |
int TRUNCATE = 7; |
| 43 |
|
| 44 |
/** |
| 45 |
* Write to the file. |
| 46 |
*/ |
| 47 |
int WRITE = 8; |
| 48 |
|
| 49 |
/** |
| 50 |
* Record the method. |
| 51 |
* |
| 52 |
* @param op the operation |
| 53 |
* @param fileName the file name or file name list |
| 54 |
* @param data the data or null |
| 55 |
* @param x the value or 0 |
| 56 |
*/ |
| 57 |
void log(int op, String fileName, byte[] data, long x); |
| 58 |
|
| 59 |
} |