File D:\maven-qcr-plugin-testsunitaires\qcr4java\h2-1.3.170-sources\target\site\qc\lecode\util\CacheWriter.java.html

1 /*
2 * Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
3 * Version 1.0, and under the Eclipse Public License, Version 1.0
4 * (http://h2database.com/html/license.html).
5 * Initial Developer: H2 Group
6 */
7 package org.h2.util;
8
9 import org.h2.message.Trace;
10
11 /**
12 * The cache writer is called by the cache to persist changed data that needs to
13 * be removed from the cache.
14 */
15 public interface CacheWriter {
16
17 /**
18 * Persist a record.
19 *
20 * @param entry the cache entry
21 */
22 void writeBack(CacheObject entry);
23
24 /**
25 * Flush the transaction log, so that entries can be removed from the cache.
26 * This is only required if the cache is full and contains data that is not
27 * yet written to the log. It is required to write the log entries to the
28 * log first, because the log is 'write ahead'.
29 */
30 void flushLog();
31
32 /**
33 * Get the trace writer.
34 *
35 * @return the trace writer
36 */
37 Trace getTrace();
38
39 }
40