public abstract class TableAccess extends Object
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Closes the table access.
|
protected abstract void |
copy(byte[] entries,
int pre,
int last)
Copies the specified values into the database.
|
abstract void |
delete(int pre,
int nr)
Deletes the specified number of entries from the database.
|
protected abstract void |
dirty()
Marks the data structures as dirty.
|
abstract void |
flush(boolean all)
Flushes the table contents.
|
abstract void |
insert(int pre,
byte[] entries)
Inserts the specified entries into the database.
|
abstract boolean |
lock(boolean write)
Tries to acquires a lock on the table.
|
abstract int |
read1(int p,
int o)
Reads a byte value and returns it as an integer value.
|
abstract int |
read2(int p,
int o)
Reads a short value and returns it as an integer value.
|
abstract int |
read4(int p,
int o)
Reads an integer value.
|
abstract long |
read5(int p,
int o)
Reads a 5-byte value and returns it as a long value.
|
void |
replace(int pre,
byte[] entries,
int sub)
Replaces entries in the database.
|
abstract void |
write1(int p,
int o,
int v)
Writes a byte value to the specified position.
|
abstract void |
write2(int p,
int o,
int v)
Writes a short value to the specified position.
|
abstract void |
write4(int p,
int o,
int v)
Writes an integer value to the specified position.
|
abstract void |
write5(int p,
int o,
long v)
Writes a 5-byte value to the specified position.
|
public abstract void flush(boolean all) throws IOException
all
- flush all contents or only buffersIOException
- I/O exceptionpublic abstract void close() throws IOException
IOException
- I/O exceptionpublic abstract boolean lock(boolean write)
write
- write/read lockpublic abstract int read1(int p, int o)
p
- pre valueo
- offsetpublic abstract int read2(int p, int o)
p
- pre valueo
- offsetpublic abstract int read4(int p, int o)
p
- pre valueo
- offsetpublic abstract long read5(int p, int o)
p
- pre valueo
- offsetpublic abstract void write1(int p, int o, int v)
p
- pre valueo
- offsetv
- value to be writtenpublic abstract void write2(int p, int o, int v)
p
- pre valueo
- offsetv
- value to be writtenpublic abstract void write4(int p, int o, int v)
p
- pre valueo
- offsetv
- value to be writtenpublic abstract void write5(int p, int o, long v)
p
- pre valueo
- offsetv
- value to be writtenpublic final void replace(int pre, byte[] entries, int sub)
pre
- node to be replacedentries
- new entriessub
- size of the subtree that is replacedprotected abstract void dirty()
protected abstract void copy(byte[] entries, int pre, int last)
entries
- entries to copypre
- first target pre valuelast
- last pre valuepublic abstract void delete(int pre, int nr)
pre
- pre value of the first node to deletenr
- number of entries to be deletedpublic abstract void insert(int pre, byte[] entries)
pre
- pre valueentries
- array of bytes containing the entries to insertCopyright © 2005–2015 BaseX Team. All rights reserved.