org.h2.util
Interface CacheWriter

All Known Implementing Classes:
DiskFile, PageStore

public interface CacheWriter

The cache writer is called by the cache to persist changed data that needs to be removed from the cache.


Method Summary
 void flushLog()
          Flush the log file, so that entries can be removed from the cache.
 Trace getTrace()
          Get the trace writer.
 void writeBack(CacheObject entry)
          Persist a record.
 

Method Detail

writeBack

void writeBack(CacheObject entry)
               throws java.sql.SQLException
Persist a record.

Parameters:
entry - the cache entry
Throws:
java.sql.SQLException

flushLog

void flushLog()
              throws java.sql.SQLException
Flush the log file, so that entries can be removed from the cache. This is only required if the cache is full and contains data that is not yet written to the log file. It is required to write the log entries to the log file first, because the log file is 'write ahead'.

Throws:
java.sql.SQLException

getTrace

Trace getTrace()
Get the trace writer.

Returns:
the trace writer