Top Description Inners Fields Constructors Methods
org.hsqldb.persist

public Class RAShadowFile

extends Object
Class Inheritance
Imports
java.io.FileInputStream, .FileNotFoundException, .IOException, org.hsqldb.Database, org.hsqldb.lib.EventLogInterface, .HsqlByteArrayOutputStream, .InputStreamInterface, org.hsqldb.lib.java.JavaSystem, org.hsqldb.map.BitMap

Wrapper for random access file for incremental backup of the .data file.
Author
Fred Toussi (fredt@users dot sourceforge.net)
Since
1.9.0
Version
2.7.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv final BitMap
pack-priv byte[]
pack-priv HsqlByteArrayOutputStream
pack-priv RandomAccessInterface
private static final int
pack-priv final EventLogInterface
pack-priv final long
pack-priv final int
pack-priv final String
pack-priv long
pack-priv final RandomAccessInterface
pack-priv long
pack-priv boolean

Constructor Summary

AccessConstructor and Description
pack-priv
RAShadowFile(EventLogInterface logger, RandomAccessInterface source, String pathName, long maxSize, int pageSize)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
close()

Called externally after a series of copy() calls.

pack-priv int
copy(long fileOffset, int size)

private int
copy(int pageOffset)

public InputStreamInterface
public long
private static RandomAccessInterface
getStorage(Database database, String pathName, String openMode)

private void
open()

public static void
restoreFile(Database database, String sourceName, String destName)

todo - take account of incomplete addition of block due to lack of disk

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bitMapback to summary
pack-priv final BitMap bitMap
bufferback to summary
pack-priv byte[] buffer
byteArrayOutputStreamback to summary
pack-priv HsqlByteArrayOutputStream byteArrayOutputStream
destback to summary
pack-priv RandomAccessInterface dest
headerSizeback to summary
private static final int headerSize
loggerback to summary
pack-priv final EventLogInterface logger
maxSizeback to summary
pack-priv final long maxSize
pageSizeback to summary
pack-priv final int pageSize
pathNameback to summary
pack-priv final String pathName
savedLengthback to summary
pack-priv long savedLength
sourceback to summary
pack-priv final RandomAccessInterface source
synchLengthback to summary
pack-priv long synchLength
zeroPageSetback to summary
pack-priv boolean zeroPageSet

Constructor Detail

RAShadowFileback to summary
pack-priv RAShadowFile(EventLogInterface logger, RandomAccessInterface source, String pathName, long maxSize, int pageSize)

Method Detail

closeback to summary
pack-priv void close() throws IOException

Called externally after a series of copy() calls. Called internally after a restore or when error in writing

copyback to summary
pack-priv int copy(long fileOffset, int size) throws IOException
copyback to summary
private int copy(int pageOffset) throws IOException
getInputStreamback to summary
public InputStreamInterface getInputStream()
getSavedLengthback to summary
public long getSavedLength()
getStorageback to summary
private static RandomAccessInterface getStorage(Database database, String pathName, String openMode) throws IOException
openback to summary
private void open() throws IOException
restoreFileback to summary
public static void restoreFile(Database database, String sourceName, String destName) throws IOException

todo - take account of incomplete addition of block due to lack of disk

synchback to summary
public void synch()
org.hsqldb.persist back to summary

pack-priv Class RAShadowFile.InputStreamShadow

extends Object
implements InputStreamInterface
Class Inheritance
All Implemented Interfaces
org.hsqldb.lib.InputStreamInterface

Field Summary

Modifier and TypeField and Description
pack-priv long
pack-priv boolean
pack-priv FileInputStream
pack-priv long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
public void
public long
private void
public int
public int
public int
read(byte[] bytes, int offset, int length)

Implements org.hsqldb.lib.InputStreamInterface.read.

public void
public long
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fetchedSizeback to summary
pack-priv long fetchedSize
initialisedback to summary
pack-priv boolean initialised
isback to summary
pack-priv FileInputStream is
limitSizeback to summary
pack-priv long limitSize

Constructor Detail

InputStreamShadowback to summary
pack-priv InputStreamShadow()

Method Detail

availableback to summary
public int available()

Implements org.hsqldb.lib.InputStreamInterface.available.

closeback to summary
public void close() throws IOException

Implements org.hsqldb.lib.InputStreamInterface.close.

getSizeLimitback to summary
public long getSizeLimit()

Implements org.hsqldb.lib.InputStreamInterface.getSizeLimit.

Doc from org.hsqldb.lib.InputStreamInterface.getSizeLimit.

Invariant. Number of characters in stream, including any already read.

initialiseback to summary
private void initialise()
readback to summary
public int read() throws IOException

Implements org.hsqldb.lib.InputStreamInterface.read.

readback to summary
public int read(byte[] bytes) throws IOException

Implements org.hsqldb.lib.InputStreamInterface.read.

readback to summary
public int read(byte[] bytes, int offset, int length) throws IOException

Implements org.hsqldb.lib.InputStreamInterface.read.

setSizeLimitback to summary
public void setSizeLimit(long count)

Implements org.hsqldb.lib.InputStreamInterface.setSizeLimit.

skipback to summary
public long skip(long count)

Implements org.hsqldb.lib.InputStreamInterface.skip.